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

Add sticker_spam automod trigger

This commit is contained in:
Dragory 2020-10-16 02:01:07 +03:00
parent 1889027bd9
commit 72829cff54
8 changed files with 34 additions and 7 deletions

View file

@ -126,4 +126,21 @@ export function addRecentActionsFromMessage(pluginData: GuildPluginData<AutomodP
count: characterCount,
});
}
const stickerCount = (context.message.data.stickers || []).length;
if (stickerCount) {
pluginData.state.recentActions.push({
context,
type: RecentActionType.Sticker,
identifier: globalIdentifier,
count: stickerCount,
});
pluginData.state.recentActions.push({
context,
type: RecentActionType.Sticker,
identifier: perChannelIdentifier,
count: stickerCount,
});
}
}