aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/config')
-rw-r--r--src/commands/config/blacklist.ts8
-rw-r--r--src/commands/config/disable.ts2
-rw-r--r--src/commands/config/prefix.ts4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts
index 33bff35..8093d83 100644
--- a/src/commands/config/blacklist.ts
+++ b/src/commands/config/blacklist.ts
@@ -69,16 +69,16 @@ export default class BlacklistCommand extends BushCommand {
const global = args.global && message.author.isOwner();
const target =
typeof args.target === 'string'
- ? (await Argument.cast('channel', this.client.commandHandler.resolver, message as BushMessage, args.target)) ??
- (await Argument.cast('user', this.client.commandHandler.resolver, message as BushMessage, args.target))
+ ? (await Argument.cast('channel', client.commandHandler.resolver, message as BushMessage, args.target)) ??
+ (await Argument.cast('user', client.commandHandler.resolver, message as BushMessage, args.target))
: args.target;
if (!target) return await message.util.reply(`${util.emojis.error} Choose a valid channel or user.`);
const targetID = target.id;
if (global) {
if (action === 'toggle') {
- const blacklistedUsers = (await Global.findByPk(this.client.config.environment)).blacklistedUsers;
- const blacklistedChannels = (await Global.findByPk(this.client.config.environment)).blacklistedChannels;
+ const blacklistedUsers = (await Global.findByPk(client.config.environment)).blacklistedUsers;
+ const blacklistedChannels = (await Global.findByPk(client.config.environment)).blacklistedChannels;
action = blacklistedUsers.includes(targetID) || blacklistedChannels.includes(targetID) ? 'unblacklist' : 'blacklist';
}
const success = await util
diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts
index 27e7311..41ca8a4 100644
--- a/src/commands/config/disable.ts
+++ b/src/commands/config/disable.ts
@@ -72,7 +72,7 @@ export default class DisableCommand extends BushCommand {
if (global) {
if (action === 'toggle') {
- const disabledCommands = (await Global.findByPk(this.client.config.environment)).disabledCommands;
+ const disabledCommands = (await Global.findByPk(client.config.environment)).disabledCommands;
action = disabledCommands.includes(commandID) ? 'disable' : 'enable';
}
const success = await util
diff --git a/src/commands/config/prefix.ts b/src/commands/config/prefix.ts
index 26ae5c4..9c1ce92 100644
--- a/src/commands/config/prefix.ts
+++ b/src/commands/config/prefix.ts
@@ -38,7 +38,7 @@ export default class PrefixCommand extends BushCommand {
async exec(message: BushMessage | BushSlashMessage, args: { prefix?: string }): Promise<unknown> {
const oldPrefix = await message.guild.getSetting('prefix');
- await message.guild.setSetting('prefix', args.prefix ?? this.client.config.prefix);
+ await message.guild.setSetting('prefix', args.prefix ?? client.config.prefix);
if (args.prefix) {
return await message.util.send({
content: `${util.emojis.success} changed the server's prefix ${oldPrefix ? `from \`${oldPrefix}\`` : ''} to \`${
@@ -48,7 +48,7 @@ export default class PrefixCommand extends BushCommand {
});
} else {
return await message.util.send({
- content: `${util.emojis.success} reset the server's prefix to \`${this.client.config.prefix}\`.`,
+ content: `${util.emojis.success} reset the server's prefix to \`${client.config.prefix}\`.`,
allowedMentions: AllowedMentions.none()
});
}