From 70fac30661ee06b07baceed6e44880b16e244626 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 30 Jul 2021 19:38:16 -0400 Subject: general clean up and fix automod --- src/commands/moderation/_lockdown.ts | 2 +- src/commands/moderation/ban.ts | 4 ++-- src/commands/moderation/modlog.ts | 3 +-- src/commands/moderation/mute.ts | 2 +- src/commands/moderation/removeReactionEmoji.ts | 3 +-- src/commands/moderation/role.ts | 2 +- src/commands/moderation/slowmode.ts | 2 +- src/commands/moderation/warn.ts | 1 - 8 files changed, 8 insertions(+), 11 deletions(-) (limited to 'src/commands/moderation') diff --git a/src/commands/moderation/_lockdown.ts b/src/commands/moderation/_lockdown.ts index db074b1..df5a9b4 100644 --- a/src/commands/moderation/_lockdown.ts +++ b/src/commands/moderation/_lockdown.ts @@ -13,7 +13,7 @@ export default class LockdownCommand extends BushCommand { args: [ { id: 'all', - type: 'flag', + match: 'flag', flag: '--all' } ], diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index 3736165..9239f2a 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -10,7 +10,7 @@ export default class BanCommand extends BushCommand { description: { content: 'Ban a member from the server.', usage: 'ban [--delete ]', - examples: ['ban 322862723090219008 1 day commands in #general --delete 7'] + examples: ['ban ironm00n 1 day commands in #general --delete 7'] }, args: [ { @@ -35,7 +35,7 @@ export default class BanCommand extends BushCommand { id: 'days', flag: '--days', match: 'option', - type: Argument.range('integer', 0, 7, true), + customType: util.arg.range('integer', 0, 7, true), default: 0 }, { diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index c55b9a3..4850a4d 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -1,5 +1,4 @@ import { BushCommand, BushMessage, BushSlashMessage, BushUser, ModLog } from '@lib'; -import { Argument } from 'discord-akairo'; import { MessageEmbed, User } from 'discord.js'; export default class ModlogCommand extends BushCommand { @@ -15,7 +14,7 @@ export default class ModlogCommand extends BushCommand { args: [ { id: 'search', - type: Argument.union('user', 'string'), + customType: util.arg.union('user', 'string'), prompt: { start: 'What case id or user would you like to see?', retry: '{error} Choose a valid case id or user.' diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 31cd233..7f3edbb 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -9,7 +9,7 @@ export default class MuteCommand extends BushCommand { description: { content: 'Mute a user.', usage: 'mute [reason] [duration]', - examples: ['mute 322862723090219008 1 day commands in #general'] + examples: ['mute ironm00n 1 day commands in #general'] }, args: [ { diff --git a/src/commands/moderation/removeReactionEmoji.ts b/src/commands/moderation/removeReactionEmoji.ts index cb1be04..de5e8ce 100644 --- a/src/commands/moderation/removeReactionEmoji.ts +++ b/src/commands/moderation/removeReactionEmoji.ts @@ -1,5 +1,4 @@ import { BushCommand, BushMessage } from '@lib'; -import { Argument } from 'discord-akairo'; import { Emoji } from 'discord.js'; export default class RemoveReactionEmojiCommand extends BushCommand { @@ -25,7 +24,7 @@ export default class RemoveReactionEmojiCommand extends BushCommand { }, { id: 'emoji', - type: Argument.union('emoji', 'bigint'), + customType: util.arg.union('emoji', 'bigint'), match: 'restContent', prompt: { start: 'What emoji would you like to remove?', diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index fe8724d..bd8cf8d 100644 --- a/src/commands/moderation/role.ts +++ b/src/commands/moderation/role.ts @@ -14,7 +14,7 @@ export default class RoleCommand extends BushCommand { args: [ { id: 'action', - type: [['add'], ['remove']], + customType: [['add'], ['remove']], prompt: { start: 'Would you like to `add` or `remove` a role?', retry: '{error} Choose whether you would you like to `add` or `remove` a role.' diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts index 9b0d300..441a0ac 100644 --- a/src/commands/moderation/slowmode.ts +++ b/src/commands/moderation/slowmode.ts @@ -15,7 +15,7 @@ export default class SlowModeCommand extends BushCommand { args: [ { id: 'length', - type: Argument.union('duration', 'off', 'none', 'disable'), + customType: Argument.union('duration', 'off', 'none', 'disable'), default: 0, prompt: { start: 'What would you like to set the slowmode to?', diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts index c5b4f43..3f9e9b5 100644 --- a/src/commands/moderation/warn.ts +++ b/src/commands/moderation/warn.ts @@ -21,7 +21,6 @@ export default class WarnCommand extends BushCommand { }, { id: 'reason', - type: 'content', match: 'rest', prompt: { start: 'Why should this user be warned?', -- cgit