diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-06-24 00:56:16 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-06-24 00:56:16 -0400 |
commit | 4176b6258e44e4a095376aaf0f4c687244243a69 (patch) | |
tree | 3b9144be9a2045483c90d92fff05b3ca0b288e52 /src/commands/dev | |
parent | e80446e23060c0325bbd6db620920d86694ec3ce (diff) | |
download | tanzanite-4176b6258e44e4a095376aaf0f4c687244243a69.tar.gz tanzanite-4176b6258e44e4a095376aaf0f4c687244243a69.tar.bz2 tanzanite-4176b6258e44e4a095376aaf0f4c687244243a69.zip |
feat(*): Began working on other punishment commands etc
Diffstat (limited to 'src/commands/dev')
-rw-r--r-- | src/commands/dev/eval.ts | 4 | ||||
-rw-r--r-- | src/commands/dev/reload.ts | 7 | ||||
-rw-r--r-- | src/commands/dev/setLevel.ts | 12 | ||||
-rw-r--r-- | src/commands/dev/superUser.ts | 2 |
4 files changed, 4 insertions, 21 deletions
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts index d2fe432..310a2c5 100644 --- a/src/commands/dev/eval.ts +++ b/src/commands/dev/eval.ts @@ -10,7 +10,7 @@ import { BushMessage } from '../../lib/extensions/BushMessage'; const clean = (text) => { if (typeof text === 'string') { - return (text = Util.cleanCodeBlockContent(text)); + return Util.cleanCodeBlockContent(text); } else return text; }; const sh = promisify(exec); @@ -186,7 +186,7 @@ export default class EvalCommand extends BushCommand { { Global } = await import('../../lib/models/Global'), { Guild } = await import('../../lib/models/Guild'), { Level } = await import('../../lib/models/Level'), - { Modlog } = await import('../../lib/models/Modlog'), + { ModLog } = await import('../../lib/models/ModLog'), { StickyRole } = await import('../../lib/models/StickyRole'); if (code[code.lang].replace(/ /g, '').includes('9+10' || '10+9')) { output = 21; diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts index 94e31b0..f5fee88 100644 --- a/src/commands/dev/reload.ts +++ b/src/commands/dev/reload.ts @@ -1,6 +1,5 @@ import { stripIndent } from 'common-tags'; import { Message } from 'discord.js'; -import { SlashCommandOption } from '../../lib/extensions/BushClientUtil'; import { BushCommand } from '../../lib/extensions/BushCommand'; import { BushSlashMessage } from '../../lib/extensions/BushInteractionMessage'; @@ -51,11 +50,7 @@ export default class ReloadCommand extends BushCommand { } } - public async exec(message: Message, { fast }: { fast: boolean }): Promise<void> { + public async exec(message: Message | BushSlashMessage, { fast }: { fast: boolean }): Promise<void> { await message.util.send(await this.getResponse(fast)); } - - public async execSlash(message: BushSlashMessage, { fast }: { fast: SlashCommandOption<boolean> }): Promise<void> { - await message.interaction.reply(await this.getResponse(fast?.value)); - } } diff --git a/src/commands/dev/setLevel.ts b/src/commands/dev/setLevel.ts index ca555db..f536109 100644 --- a/src/commands/dev/setLevel.ts +++ b/src/commands/dev/setLevel.ts @@ -1,7 +1,5 @@ import { Message, User } from 'discord.js'; -import { SlashCommandOption } from '../../lib/extensions/BushClientUtil'; import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushSlashMessage } from '../../lib/extensions/BushInteractionMessage'; import { Level } from '../../lib/models'; import AllowedMentions from '../../lib/utils/AllowedMentions'; @@ -71,14 +69,4 @@ export default class SetLevelCommand extends BushCommand { allowedMentions: AllowedMentions.none() }); } - - async execSlash( - message: BushSlashMessage, - { user, level }: { user: SlashCommandOption<void>; level: SlashCommandOption<number> } - ): Promise<void> { - await message.interaction.reply({ - content: await this.setLevel(user.user, level.value), - allowedMentions: AllowedMentions.none() - }); - } } diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts index c3ed0b0..4562e6f 100644 --- a/src/commands/dev/superUser.ts +++ b/src/commands/dev/superUser.ts @@ -2,7 +2,7 @@ import { Constants } from 'discord-akairo'; import { User } from 'discord.js'; import { BushCommand } from '../../lib/extensions/BushCommand'; import { BushMessage } from '../../lib/extensions/BushMessage'; -import { Global } from '../../lib/models/Global'; +import { Global } from '../../lib/models'; export default class SuperUserCommand extends BushCommand { public constructor() { |