aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config/joinRoles.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-25 18:27:29 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-25 18:27:29 -0400
commit2e539511a49ff993eded39751a2e768315ee4ff6 (patch)
tree32f0f1f512e87f2c0a9e4aa9db60fe2a349b1a71 /src/commands/config/joinRoles.ts
parent1d9691083645fac0389ec98adfa66c99f75d58ad (diff)
downloadtanzanite-2e539511a49ff993eded39751a2e768315ee4ff6.tar.gz
tanzanite-2e539511a49ff993eded39751a2e768315ee4ff6.tar.bz2
tanzanite-2e539511a49ff993eded39751a2e768315ee4ff6.zip
some fixes
Diffstat (limited to 'src/commands/config/joinRoles.ts')
-rw-r--r--src/commands/config/joinRoles.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/commands/config/joinRoles.ts b/src/commands/config/joinRoles.ts
index 89a2421..9507d4b 100644
--- a/src/commands/config/joinRoles.ts
+++ b/src/commands/config/joinRoles.ts
@@ -39,12 +39,15 @@ export default class JoinRolesCommand extends BushCommand {
public override async exec(message: BushMessage | BushSlashMessage, { role }: { role: Role }): Promise<unknown> {
const joinRoles = await message.guild!.getSetting('joinRoles');
- const newValue = util.addOrRemoveFromArray(joinRoles.includes(role.id) ? 'remove' : 'add', joinRoles, role.id);
+ const includes = joinRoles.includes(role.id);
+ client.console.debug(joinRoles);
+ const newValue = util.addOrRemoveFromArray(includes ? 'remove' : 'add', joinRoles, role.id);
await message.guild!.setSetting('joinRoles', newValue);
+ client.console.debug(joinRoles);
return await message.util.reply({
- content: `${util.emojis.success} Successfully ${joinRoles.includes(role.id) ? 'removed' : 'added'} <@&${
- role.id
- }> from being assigned to members when they join the server.`,
+ content: `${util.emojis.success} Successfully ${includes ? 'removed' : 'added'} <@&${role.id}> ${
+ includes ? 'from' : 'to'
+ }from being assigned to members when they join the server.`,
allowedMentions: AllowedMentions.none()
});
}