aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-25 16:16:44 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-25 16:16:44 -0400
commit4364f1d344e75d23728ce951fc768bc9c8405bed (patch)
tree47dbdb0482fc16842271c44e3736ba86e0064351 /src/commands/config
parent95dc4c4a4abeed75f419c9ccd5b3f072609c5035 (diff)
downloadtanzanite-4364f1d344e75d23728ce951fc768bc9c8405bed.tar.gz
tanzanite-4364f1d344e75d23728ce951fc768bc9c8405bed.tar.bz2
tanzanite-4364f1d344e75d23728ce951fc768bc9c8405bed.zip
cleaned up, wolfram alpha command, a few fixes
Diffstat (limited to 'src/commands/config')
-rw-r--r--src/commands/config/autoPublishChannel.ts2
-rw-r--r--src/commands/config/joinRoles.ts19
2 files changed, 9 insertions, 12 deletions
diff --git a/src/commands/config/autoPublishChannel.ts b/src/commands/config/autoPublishChannel.ts
index 10c4ab6..a58f32f 100644
--- a/src/commands/config/autoPublishChannel.ts
+++ b/src/commands/config/autoPublishChannel.ts
@@ -51,7 +51,7 @@ export default class AutoPublishChannelCommand extends BushCommand {
client.logger.debugRaw(autoPublishChannels.includes(channel.id));
return await message.util.reply({
content: `${util.emojis.success} Successfully ${
- autoPublishChannels.includes(channel.id) ? 'disabled' : 'enabled'
+ autoPublishChannels.includes(channel.id) ? 'enabled' : 'disabled'
} auto publishing in <#${channel.id}>.`,
allowedMentions: AllowedMentions.none()
});
diff --git a/src/commands/config/joinRoles.ts b/src/commands/config/joinRoles.ts
index ee2ce75..89a2421 100644
--- a/src/commands/config/joinRoles.ts
+++ b/src/commands/config/joinRoles.ts
@@ -1,5 +1,5 @@
import { AllowedMentions, BushCommand, BushMessage, BushSlashMessage } from '@lib';
-import { Channel } from 'discord.js';
+import { Role } from 'discord.js';
export default class JoinRolesCommand extends BushCommand {
public constructor() {
@@ -36,18 +36,15 @@ export default class JoinRolesCommand extends BushCommand {
userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD']
});
}
- public override async exec(message: BushMessage | BushSlashMessage, { channel }: { channel: Channel }): Promise<unknown> {
- const autoPublishChannels = await message.guild!.getSetting('joinRoles');
- const newValue = util.addOrRemoveFromArray(
- autoPublishChannels.includes(channel.id) ? 'remove' : 'add',
- autoPublishChannels,
- channel.id
- );
+
+ 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);
await message.guild!.setSetting('joinRoles', newValue);
return await message.util.reply({
- content: `${util.emojis.success} Successfully ${
- autoPublishChannels.includes(channel.id) ? 'disabled' : 'enabled'
- } auto publishing in <#${channel.id}>.`,
+ content: `${util.emojis.success} Successfully ${joinRoles.includes(role.id) ? 'removed' : 'added'} <@&${
+ role.id
+ }> from being assigned to members when they join the server.`,
allowedMentions: AllowedMentions.none()
});
}