From 514b7ee2bf3ff31afd5eab32031315fd6fd9d460 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:27:46 +1100 Subject: [PATCH] Add author field to punishment log --- src/components/Punish.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Punish.ts b/src/components/Punish.ts index 249445f..fdc19ba 100644 --- a/src/components/Punish.ts +++ b/src/components/Punish.ts @@ -14,7 +14,7 @@ export default async(client:TClient, interaction: Discord.ChatInputCommandIntera const punishLog = `${GuildMember?.user?.username ?? User?.username ?? 'No user data'} ${time ? ['warn', 'kick'].includes(type) ? 'and no duration set' : `and ${time} (duration)` : ''} was used in \`/${interaction.commandName}\` for \`${reason}\``; Logger.console('log', 'PunishmentLog', punishLog); - (client.channels.cache.get(client.config.dcServer.channels.punishment_log) as Discord.TextChannel).send({embeds:[new client.embed().setColor(client.config.embedColor).setTitle('Punishment Log').setDescription(punishLog).setTimestamp()]}); + (client.channels.cache.get(client.config.dcServer.channels.punishment_log) as Discord.TextChannel).send({embeds:[new client.embed().setColor(client.config.embedColor).setAuthor({name: interaction.user.username, iconURL: interaction.user.avatarURL({size:2048})}).setTitle('Punishment Log').setDescription(punishLog).setTimestamp()]}); if (!GuildMember.moderatable) return interaction.reply(`I cannot ${type} this user.`); if (interaction.user.id === User.id) return interaction.reply(`You cannot ${type} yourself.`);