diff --git a/commands/warn/add.js b/commands/warn/add.js index 1e6fbce..8e35b20 100644 --- a/commands/warn/add.js +++ b/commands/warn/add.js @@ -6,6 +6,8 @@ async function addWarn(Warn, serverID, userID, reason) { module.exports.run = async (interaction, warnMessage, Warn, checkforInfectedGuilds) => { // get information const userID = interaction.options.getUser('user', true).id; + // checking if user is AB + if (userID === client.user.id) return messageFail(interaction, 'You can\'t warn the bot itself!'); // add warn await addWarn(Warn, interaction.guild.id, userID, warnMessage); messageSuccess(interaction, `The user with the ID \`${userID}\` got a new warning added.\n Warning other servers.`);