generated from Baipyrus/DiscordJS-Template
clean up: consistency
This commit is contained in:
parent
9091e1c023
commit
663f1313e9
@ -64,11 +64,12 @@ export async function execute(interaction) {
|
||||
});
|
||||
|
||||
// Toggle role assignment if found
|
||||
if (found) {
|
||||
if (found !== null) {
|
||||
found.assign = true;
|
||||
await found.save();
|
||||
// Otherwise create new database entry
|
||||
} else await registerRole(interaction.guild, role);
|
||||
|
||||
// Reply successfully to acknowledge command
|
||||
await interaction.reply({
|
||||
content: 'Successfully registered role.',
|
||||
|
@ -52,7 +52,7 @@ const registerSelfRoles = async (interaction) => {
|
||||
where: { id }
|
||||
});
|
||||
|
||||
if (found) throw new Error('Messages already registered!');
|
||||
if (found !== null) throw new Error('Messages already registered!');
|
||||
|
||||
// Reply successfully to acknowledge command
|
||||
await interaction.reply({
|
||||
|
Loading…
Reference in New Issue
Block a user