mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 16:30:58 -05:00
Add catch for bot being moderated.
This commit is contained in:
parent
252d386a89
commit
b4ff75f375
@ -150,7 +150,7 @@ export default class TClient extends Client {
|
|||||||
|
|
||||||
if (interaction.user.id == User.id) return interaction.reply(`You cannot ${type} yourself.`);
|
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 && 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 interaction.deferReply();
|
||||||
await client.punishments.addPunishment(type, { time, interaction }, interaction.user.id, reason, User, GuildMember);
|
await client.punishments.addPunishment(type, { time, interaction }, interaction.user.id, reason, User, GuildMember);
|
||||||
|
Loading…
Reference in New Issue
Block a user