From fc2473e85218bf8c0c988e17cc3533c8dd2f4ac7 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Fri, 10 Feb 2023 08:50:17 +1100 Subject: [PATCH] Add catch for bot being moderated. --- src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 212cae3..f4f11a6 100644 --- a/src/client.ts +++ b/src/client.ts @@ -150,7 +150,7 @@ export default class TClient extends Client { if (interaction.user.id == User.id) return interaction.reply(`You cannot ${type} yourself.`); if (!GuildMember && type != 'ban') return interaction.reply(`You cannot ${type} someone who is not in the server.`); - + if (GuildMember.user.bot) return interaction.reply(`You cannot ${type} a bot!`); await interaction.deferReply(); await client.punishments.addPunishment(type, { time, interaction }, interaction.user.id, reason, User, GuildMember);