Add some custom error messages for perms and length of nick
All checks were successful
NodBot Production Dockerization / build (push) Successful in 1m14s
All checks were successful
NodBot Production Dockerization / build (push) Successful in 1m14s
This commit is contained in:
parent
6fad8c6cdc
commit
8878ac76e8
@ -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!');
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user