aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/config/blacklist.ts4
-rw-r--r--src/commands/config/disable.ts2
-rw-r--r--src/commands/dev/superUser.ts2
-rw-r--r--src/commands/info/help.ts4
-rw-r--r--src/commands/info/invite.ts2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts
index 4706041..9047c41 100644
--- a/src/commands/config/blacklist.ts
+++ b/src/commands/config/blacklist.ts
@@ -77,9 +77,9 @@ export default class BlacklistCommand extends BushCommand {
if (global) {
if (action === 'toggle') {
- const blacklistedUsers = (await Global.findByPk(this.client.config.dev ? 'development' : 'production'))
+ const blacklistedUsers = (await Global.findByPk(this.client.config.environment))
.blacklistedUsers;
- const blacklistedChannels = (await Global.findByPk(this.client.config.dev ? 'development' : 'production'))
+ const blacklistedChannels = (await Global.findByPk(this.client.config.environment))
.blacklistedChannels;
action = blacklistedUsers.includes(targetID) || blacklistedChannels.includes(targetID) ? 'unblacklist' : 'blacklist';
}
diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts
index 007cdb1..f6caf88 100644
--- a/src/commands/config/disable.ts
+++ b/src/commands/config/disable.ts
@@ -71,7 +71,7 @@ export default class DisableCommand extends BushCommand {
if (global) {
if (action === 'toggle') {
- const disabledCommands = (await Global.findByPk(this.client.config.dev ? 'development' : 'production'))
+ const disabledCommands = (await Global.findByPk(this.client.config.environment))
.disabledCommands;
action = disabledCommands.includes(commandID) ? 'disable' : 'enable';
}
diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts
index 83623df..e06d064 100644
--- a/src/commands/dev/superUser.ts
+++ b/src/commands/dev/superUser.ts
@@ -43,7 +43,7 @@ export default class SuperUserCommand extends BushCommand {
if (!message.author.isOwner())
return await message.util.reply(`${this.client.util.emojis.error} Only my developers can run this command.`);
- const superUsers = (await Global.findByPk(this.client.config.dev ? 'development' : 'production')).superUsers;
+ const superUsers = (await Global.findByPk(this.client.config.environment)).superUsers;
let success;
if (args.action === 'add') {
if (superUsers.includes(args.user.id)) {
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index a0b03a0..e485d24 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -46,9 +46,9 @@ export default class HelpCommand extends BushCommand {
message: BushMessage | BushSlashMessage,
args: { command: BushCommand | string; showHidden?: boolean }
): Promise<unknown> {
- const prefix = this.client.config.dev ? 'dev ' : message.util.parsed.prefix;
+ const prefix = this.client.config.isDevelopment ? 'dev ' : message.util.parsed.prefix;
const components =
- !this.client.config.dev || !this.client.guilds.cache.some((guild) => guild.ownerId === message.author.id)
+ !this.client.config.isDevelopment || !this.client.guilds.cache.some((guild) => guild.ownerId === message.author.id)
? [
new MessageActionRow().addComponents(
new MessageButton({
diff --git a/src/commands/info/invite.ts b/src/commands/info/invite.ts
index f53e930..923c54a 100644
--- a/src/commands/info/invite.ts
+++ b/src/commands/info/invite.ts
@@ -19,7 +19,7 @@ export default class InviteCommand extends BushCommand {
}
public async exec(message: BushMessage | BushSlashMessage): Promise<unknown> {
- if (this.client.config.dev)
+ if (this.client.config.isDevelopment)
return await message.util.reply(`${this.client.util.emojis.error} The dev bot cannot be invited.`);
const ButtonRow = new MessageActionRow().addComponents(
new MessageButton({