diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-30 19:38:16 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-30 19:38:16 -0400 |
commit | 70fac30661ee06b07baceed6e44880b16e244626 (patch) | |
tree | 44b4c573043fc369ba9c79ef368da2f08f34e442 /src/commands/utilities | |
parent | f5c2b7b946487c2828365cc63bc6f471dd6cfc2f (diff) | |
download | tanzanite-70fac30661ee06b07baceed6e44880b16e244626.tar.gz tanzanite-70fac30661ee06b07baceed6e44880b16e244626.tar.bz2 tanzanite-70fac30661ee06b07baceed6e44880b16e244626.zip |
general clean up and fix automod
Diffstat (limited to 'src/commands/utilities')
-rw-r--r-- | src/commands/utilities/decode.ts | 4 | ||||
-rw-r--r-- | src/commands/utilities/hash.ts | 4 | ||||
-rw-r--r-- | src/commands/utilities/price.ts | 7 | ||||
-rw-r--r-- | src/commands/utilities/uuid.ts | 5 | ||||
-rw-r--r-- | src/commands/utilities/viewraw.ts | 10 |
5 files changed, 12 insertions, 18 deletions
diff --git a/src/commands/utilities/decode.ts b/src/commands/utilities/decode.ts index aa3d455..cab23d8 100644 --- a/src/commands/utilities/decode.ts +++ b/src/commands/utilities/decode.ts @@ -18,7 +18,7 @@ export default class DecodeCommand extends BushCommand { args: [ { id: 'from', - type: encodingTypesArray, + customType: encodingTypesArray, prompt: { start: 'What is the encoding of the original data?', retry: `{error} Choose one of the following ${encodingTypesString} for the encoding of the original data.` @@ -26,7 +26,7 @@ export default class DecodeCommand extends BushCommand { }, { id: 'to', - type: encodingTypesArray, + customType: encodingTypesArray, prompt: { start: 'What would you like the encoding of the resulting data to be?', retry: `{error} Choose one of the following ${encodingTypesString} for the encoding of the resulting data.` diff --git a/src/commands/utilities/hash.ts b/src/commands/utilities/hash.ts index 4b5b01c..fcf2da3 100644 --- a/src/commands/utilities/hash.ts +++ b/src/commands/utilities/hash.ts @@ -1,5 +1,4 @@ import crypto from 'crypto'; -import { Constants } from 'discord-akairo'; import got from 'got'; import { BushCommand, BushMessage } from '../../lib'; @@ -16,8 +15,7 @@ export default class HashCommand extends BushCommand { args: [ { id: 'url', - type: Constants.ArgumentTypes.URL, - match: Constants.ArgumentMatches.PHRASE, + type: 'url', prompt: { start: 'What url would you like to find the hash of?', retry: '{error} Enter a valid url.' diff --git a/src/commands/utilities/price.ts b/src/commands/utilities/price.ts index d04544b..38cd8ca 100644 --- a/src/commands/utilities/price.ts +++ b/src/commands/utilities/price.ts @@ -1,4 +1,3 @@ -import { Constants } from 'discord-akairo'; import { MessageEmbed } from 'discord.js'; import Fuse from 'fuse.js'; import fetch from 'node-fetch'; @@ -66,8 +65,8 @@ export default class PriceCommand extends BushCommand { args: [ { id: 'item', - match: Constants.ArgumentMatches.CONTENT, - type: Constants.ArgumentTypes.STRING, + type: 'string', + match: 'content', prompt: { start: 'What item would you like to find the price of?', retry: '{error} Choose a valid item.' @@ -75,7 +74,7 @@ export default class PriceCommand extends BushCommand { }, { id: 'strict', - match: Constants.ArgumentMatches.FLAG, + match: 'flag', flag: '--strict', default: false } diff --git a/src/commands/utilities/uuid.ts b/src/commands/utilities/uuid.ts index 7ff80d2..02ca506 100644 --- a/src/commands/utilities/uuid.ts +++ b/src/commands/utilities/uuid.ts @@ -1,4 +1,3 @@ -import { Constants } from 'discord-akairo'; import { BushCommand, BushMessage } from '../../lib'; export default class UuidCommand extends BushCommand { @@ -14,8 +13,8 @@ export default class UuidCommand extends BushCommand { args: [ { id: 'ign', - type: /\w{1,16}/im, - match: Constants.ArgumentMatches.PHRASE, + customType: /\w{1,16}/im, + prompt: { start: 'What ign would you like to find the uuid of?', retry: '{error} Choose a valid ign.', diff --git a/src/commands/utilities/viewraw.ts b/src/commands/utilities/viewraw.ts index ca5b2de..ca21b4b 100644 --- a/src/commands/utilities/viewraw.ts +++ b/src/commands/utilities/viewraw.ts @@ -1,4 +1,3 @@ -import { Argument, Constants } from 'discord-akairo'; import { DMChannel, Message, MessageEmbed, NewsChannel, Snowflake, TextChannel } from 'discord.js'; import { inspect } from 'util'; import { BushCommand, BushMessage, BushSlashMessage } from '../../lib'; @@ -17,8 +16,8 @@ export default class ViewRawCommand extends BushCommand { args: [ { id: 'message', - type: Argument.union(Constants.ArgumentTypes.MESSAGE, Constants.ArgumentTypes.BIGINT), - match: Constants.ArgumentMatches.PHRASE, + customType: util.arg.union('message', 'bigint'), + prompt: { start: 'What message would you like to view?', retry: '{error} Choose a valid message.', @@ -27,8 +26,7 @@ export default class ViewRawCommand extends BushCommand { }, { id: 'channel', - type: Constants.ArgumentTypes.CHANNEL, - match: Constants.ArgumentMatches.PHRASE, + type: 'channel', prompt: { start: 'What channel is the message in?', retry: '{error} Choose a valid channel.', @@ -38,7 +36,7 @@ export default class ViewRawCommand extends BushCommand { }, { id: 'json', - match: Constants.ArgumentMatches.FLAG, + match: 'flag', flag: '--json' } ] |