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,8 +524,10 @@
|
|||||||
});
|
});
|
||||||
funct.fail(function(data) {
|
funct.fail(function(data) {
|
||||||
Materialize.toast('Failed to send message.', 10000);
|
Materialize.toast('Failed to send message.', 10000);
|
||||||
for (var i = 0; i < data.responseJSON.illegal_reasons.length; i++) {
|
if (data.responseJSON) {
|
||||||
Materialize.toast(data.responseJSON.illegal_reasons[i], 10000);
|
for (var i = 0; i < data.responseJSON.illegal_reasons.length; i++) {
|
||||||
|
Materialize.toast(data.responseJSON.illegal_reasons[i], 10000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
funct.catch(function(data) {
|
funct.catch(function(data) {
|
||||||
|
Loading…
Reference in New Issue
Block a user