diff options
Diffstat (limited to 'src/commands/dev')
-rw-r--r-- | src/commands/dev/superUser.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts index 957e2b7..1b2fd7c 100644 --- a/src/commands/dev/superUser.ts +++ b/src/commands/dev/superUser.ts @@ -1,4 +1,5 @@ import { BushCommand, BushMessage, BushSlashMessage, Global } from '@lib'; +import { ArgumentOptions, Flag } from 'discord-akairo'; import { User } from 'discord.js'; export default class SuperUserCommand extends BushCommand { @@ -15,14 +16,14 @@ export default class SuperUserCommand extends BushCommand { ownerOnly: true }); } - *args(): unknown { + *args(): IterableIterator<ArgumentOptions | Flag> { const action = yield { id: 'action', type: ['add', 'remove'], prompt: { start: 'Would you like to `add` or `remove` a user from the superuser list?', retry: '{error} Choose if you would like to `add` or `remove` a user.', - required: true + optional: false } }; const user = yield { @@ -30,9 +31,9 @@ export default class SuperUserCommand extends BushCommand { type: 'user', match: 'restContent', prompt: { - start: `Who would you like to ${action || 'add/remove'} from the superuser list?`, - retry: `Choose a valid user to ${action || 'add/remove'} from the superuser list.`, - required: true + start: `Who would you like to ${action ?? 'add/remove'} from the superuser list?`, + retry: `Choose a valid user to ${action ?? 'add/remove'} from the superuser list.`, + optional: false } }; return { action, user }; |