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

List message author IDs in bulk deletes logs (#109)

This commit is contained in:
Jonathan 2020-12-12 21:31:35 +01:00 committed by GitHub
parent ec3bf2739d
commit eb4d5ea6f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -8,11 +8,13 @@ export async function onMessageDeleteBulk(pluginData: GuildPluginData<LogsPlugin
const channel = pluginData.guild.channels.get(savedMessages[0].channel_id);
const archiveId = await pluginData.state.archives.createFromSavedMessages(savedMessages, pluginData.guild);
const archiveUrl = pluginData.state.archives.getUrl(getBaseUrl(pluginData), archiveId);
const authorIds = Array.from(new Set(savedMessages.map(item => `\`${item.user_id}\``))).join(', ');
pluginData.state.guildLogs.log(
LogType.MESSAGE_DELETE_BULK,
{
count: savedMessages.length,
authorIds,
channel,
archiveUrl,
},