From 1719509d07145c31589ae47d28325a4b95d183a2 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Wed, 24 Jan 2024 09:37:38 +1100 Subject: [PATCH] Ripbozo on Dave? --- src/components/Punish.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Punish.ts b/src/components/Punish.ts index d2c561a..249445f 100644 --- a/src/components/Punish.ts +++ b/src/components/Punish.ts @@ -16,6 +16,7 @@ export default async(client:TClient, interaction: Discord.ChatInputCommandIntera 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()]}); + if (!GuildMember.moderatable) return interaction.reply(`I cannot ${type} this user.`); if (interaction.user.id === User.id) return interaction.reply(`You cannot ${type} yourself.`); if (!GuildMember && !['unban', 'ban'].includes(type)) return interaction.reply(`You cannot ${type} someone who is not in the server.`); if (User.bot) return interaction.reply(`You cannot ${type} a bot!`);