Fix spam detection crash if a spam message is deleted before the spam filter applies
This commit is contained in:
parent
ee20363dd8
commit
88ed1d9313
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ import {
|
|||
getRoleMentions,
|
||||
getUrlsInString,
|
||||
getUserMentions,
|
||||
noop,
|
||||
stripObjectToScalars,
|
||||
trimLines,
|
||||
} from "../utils";
|
||||
|
@ -270,7 +271,7 @@ export class SpamPlugin extends ZeppelinPlugin<ISpamPluginConfig> {
|
|||
// Then, if enabled, remove the spam messages
|
||||
if (spamConfig.clean !== false) {
|
||||
msgIds.forEach(id => this.logs.ignoreLog(LogType.MESSAGE_DELETE, id));
|
||||
this.bot.deleteMessages(savedMessage.channel_id, msgIds);
|
||||
this.bot.deleteMessages(savedMessage.channel_id, msgIds).catch(noop);
|
||||
}
|
||||
|
||||
// Store the ID of the last handled message
|
||||
|
|
Loading…
Add table
Reference in a new issue