diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-17 14:14:42 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-17 14:14:42 -0400 |
commit | 4c20333646e49af2b6fcef17546041d309260c93 (patch) | |
tree | a49611f62c1098506da925e449b133916338d0de /src | |
parent | 2db40054054c9452359c83cbad23bb2c9fa3234e (diff) | |
download | tanzanite-4c20333646e49af2b6fcef17546041d309260c93.tar.gz tanzanite-4c20333646e49af2b6fcef17546041d309260c93.tar.bz2 tanzanite-4c20333646e49af2b6fcef17546041d309260c93.zip |
Merge branch 'rewrite' of https://github.com/NotEnoughUpdates/bush-bot into rewrite
Diffstat (limited to 'src')
-rw-r--r-- | src/commands/config/blacklist.ts | 6 | ||||
-rw-r--r-- | src/commands/config/disable.ts | 3 | ||||
-rw-r--r-- | src/lib/models/Global.ts | 6 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts index 9047c41..8e5d703 100644 --- a/src/commands/config/blacklist.ts +++ b/src/commands/config/blacklist.ts @@ -77,10 +77,8 @@ export default class BlacklistCommand extends BushCommand { 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(this.client.config.environment)).blacklistedUsers; + const blacklistedChannels = (await Global.findByPk(this.client.config.environment)).blacklistedChannels; action = blacklistedUsers.includes(targetID) || blacklistedChannels.includes(targetID) ? 'unblacklist' : 'blacklist'; } const success = await this.client.util diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts index f6caf88..ed9bf7d 100644 --- a/src/commands/config/disable.ts +++ b/src/commands/config/disable.ts @@ -71,8 +71,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(this.client.config.environment)).disabledCommands; action = disabledCommands.includes(commandID) ? 'disable' : 'enable'; } const success = await this.client.util diff --git a/src/lib/models/Global.ts b/src/lib/models/Global.ts index 08392c5..ee9f43c 100644 --- a/src/lib/models/Global.ts +++ b/src/lib/models/Global.ts @@ -3,7 +3,7 @@ import { DataTypes, Sequelize } from 'sequelize'; import { BaseModel } from './BaseModel'; export interface GlobalModel { - environment: 'production' | 'development'|'beta'; + environment: 'production' | 'development' | 'beta'; superUsers: Snowflake[]; disabledCommands: string[]; blacklistedUsers: Snowflake[]; @@ -12,7 +12,7 @@ export interface GlobalModel { } export interface GlobalModelCreationAttributes { - environment: 'production' | 'development'|'beta'; + environment: 'production' | 'development' | 'beta'; superUsers?: Snowflake[]; disabledCommands?: string[]; blacklistedUsers?: Snowflake[]; @@ -24,7 +24,7 @@ export class Global extends BaseModel<GlobalModel, GlobalModelCreationAttributes /** * The bot's environment. */ - environment: 'production' | 'development'|'beta'; + environment: 'production' | 'development' | 'beta'; /** * Trusted users. */ |