diff options
author | TymanWasTaken <32660892+tymanwastaken@users.noreply.github.com> | 2021-05-28 21:54:50 -0600 |
---|---|---|
committer | TymanWasTaken <32660892+tymanwastaken@users.noreply.github.com> | 2021-05-28 21:54:50 -0600 |
commit | 2456dab3db0d8eaae515606b83a6c0c317d009b0 (patch) | |
tree | c20448112d43c1b4ffae1395584d9b202aeee3ed /src/commands/moderation/warn.ts | |
parent | 1e9e334097702c68d871365fc016aa096d03c491 (diff) | |
parent | 5b5f0bf5667b922037508dfa88e40a1f8a2671ec (diff) | |
download | tanzanite-2456dab3db0d8eaae515606b83a6c0c317d009b0.tar.gz tanzanite-2456dab3db0d8eaae515606b83a6c0c317d009b0.tar.bz2 tanzanite-2456dab3db0d8eaae515606b83a6c0c317d009b0.zip |
fix conflicts
Diffstat (limited to 'src/commands/moderation/warn.ts')
-rw-r--r-- | src/commands/moderation/warn.ts | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts index 41e0032..3410d81 100644 --- a/src/commands/moderation/warn.ts +++ b/src/commands/moderation/warn.ts @@ -1,11 +1,12 @@ import { GuildMember, Message } from 'discord.js'; -import { BotCommand } from '../../lib/extensions/BotCommand'; +import { BushCommand } from '../../lib/extensions/BushCommand'; import { Guild, Modlog, ModlogType } from '../../lib/models'; -export default class WarnCommand extends BotCommand { +export default class WarnCommand extends BushCommand { public constructor() { super('warn', { aliases: ['warn'], + category: 'moderation', userPermissions: ['MANAGE_MESSAGES'], args: [ { @@ -24,10 +25,7 @@ export default class WarnCommand extends BotCommand { } }); } - public async exec( - message: Message, - { member, reason }: { member: GuildMember; reason: string } - ): Promise<void> { + public async exec(message: Message, { member, reason }: { member: GuildMember; reason: string }): Promise<void> { // Create guild entry so postgres doesn't get mad when I try and add a modlog entry await Guild.findOrCreate({ where: { @@ -47,21 +45,15 @@ export default class WarnCommand extends BotCommand { }); await entry.save(); } catch (e) { - await message.util.send( - 'Error saving to database, please contact the developers' - ); + await message.util.send('Error saving to database, please contact the developers'); return; } try { - await member.send( - `You were warned in ${message.guild.name} for reason "${reason}".` - ); + await member.send(`You were warned in ${message.guild.name} for reason "${reason}".`); } catch (e) { await message.util.send('Error messaging user, warning still saved.'); return; } - await message.util.send( - `${member.user.tag} was warned for reason "${reason}".` - ); + await message.util.send(`${member.user.tag} was warned for reason "${reason}".`); } } |