3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 15:45:03 +00:00

Automod work. Add config examples to automod.

This commit is contained in:
Dragory 2019-10-11 01:59:56 +03:00
parent a6cc1d646e
commit def46941c9
11 changed files with 539 additions and 258 deletions

View file

@ -58,5 +58,6 @@
"POSTED_SCHEDULED_MESSAGE": "\uD83D\uDCE8 Posted scheduled message (`{messageId}`) to {channelMention(channel)} as scheduled by {userMention(author)}",
"BOT_ALERT": "⚠ {tmplEval(body)}",
"AUTOMOD_ALERT": "{text}"
"AUTOMOD_ALERT": "{text}",
"AUTOMOD_ACTION": "\uD83E\uDD16 Automod rule **{rule}** triggered by {userMention(user)}, actions taken: {actionsTaken}\n{matchSummary}"
}

View file

@ -127,6 +127,14 @@ export class GuildSavedMessages extends BaseGuildRepository {
return query.getMany();
}
getMultiple(messageIds: string[]): Promise<SavedMessage[]> {
return this.messages
.createQueryBuilder()
.where("guild_id = :guild_id", { guild_id: this.guildId })
.andWhere("id IN (:messageIds)", { messageIds })
.getMany();
}
async create(data) {
const isPermanent = this.toBePermanent.has(data.id);
if (isPermanent) {

View file

@ -59,4 +59,5 @@ export enum LogType {
BOT_ALERT,
AUTOMOD_ALERT,
AUTOMOD_ACTION,
}