Add sticker_spam automod trigger

This commit is contained in:
Dragory 2020-10-16 02:01:07 +03:00
parent 0c73587b25
commit 3aada93a80
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
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,
});
}
}