mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
automod: ignore errors in 'clean' action
These are, in most cases, just that the message was already deleted before we got to it or similar.
This commit is contained in:
parent
557898e484
commit
bd09c3bdf3
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
import * as t from "io-ts";
|
||||
import { automodAction } from "../helpers";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { noop } from "../../../utils";
|
||||
|
||||
export const CleanAction = automodAction({
|
||||
configType: t.boolean,
|
||||
|
@ -28,7 +29,7 @@ export const CleanAction = automodAction({
|
|||
pluginData.state.logs.ignoreLog(LogType.MESSAGE_DELETE, id);
|
||||
}
|
||||
|
||||
await pluginData.client.deleteMessages(channelId, messageIds);
|
||||
await pluginData.client.deleteMessages(channelId, messageIds).catch(noop);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue