mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-24 14:07:03 +01:00
Fix js crash when posting msg also being ratelimited - test if json exists in content
This commit is contained in:
parent
0c544d015b
commit
ddd9a2916a
@ -524,9 +524,11 @@
|
||||
});
|
||||
funct.fail(function(data) {
|
||||
Materialize.toast('Failed to send message.', 10000);
|
||||
if (data.responseJSON) {
|
||||
for (var i = 0; i < data.responseJSON.illegal_reasons.length; i++) {
|
||||
Materialize.toast(data.responseJSON.illegal_reasons[i], 10000);
|
||||
}
|
||||
}
|
||||
});
|
||||
funct.catch(function(data) {
|
||||
if (data.status == 429) {
|
||||
|
Loading…
Reference in New Issue
Block a user