diff --git a/slash-commands/setnick.js b/slash-commands/setnick.js index f778c9a..f86b713 100644 --- a/slash-commands/setnick.js +++ b/slash-commands/setnick.js @@ -30,6 +30,12 @@ module.exports = { await interaction.editReply(`Successfully set ${user}'s nickname to ${nickname}`); } catch (error) { console.error(error); + if (error.code === 50013) { + return await interaction.editReply('I do not have permission to set the nickname of that user!'); + } + if (error.code === 50035) { + return await interaction.editReply('The nickname is too long!'); + } await interaction.editReply('There was an error while executing this command!'); } },