Add some custom error messages for perms and length of nick
All checks were successful
NodBot Production Dockerization / build (push) Successful in 1m14s

This commit is contained in:
Skylar Grant 2025-01-11 11:02:39 -05:00
parent 6fad8c6cdc
commit 8878ac76e8

View File

@ -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!');
}
},