3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 20:35:02 +00:00

Add a generic bot alert log type. Use this in several places.

This commit is contained in:
Dragory 2019-05-04 19:18:16 +03:00
parent e18193c1a2
commit 8a3097f63e
8 changed files with 110 additions and 27 deletions

View file

@ -571,7 +571,12 @@ export class MutesPlugin extends ZeppelinPlugin<IMutesPluginConfig> {
if (member) {
try {
await member.removeRole(this.getConfig().mute_role);
} catch (e) {} // tslint:disable-line
} catch (e) {
this.serverLogs.log(LogType.BOT_ALERT, {
body: `Failed to remove mute role from {userMention(member)}`,
member: stripObjectToScalars(member),
});
}
}
await this.mutes.clear(mute.user_id);