aboutsummaryrefslogtreecommitdiff
path: root/src/commands/utilities/decode.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-11-28 09:27:41 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-11-28 09:27:41 -0500
commit453683b57b8ff013ff25e2aaa4aa1d2e047edcb7 (patch)
tree8b98d2f30dbb6a8448602446cfacf9091667cc33 /src/commands/utilities/decode.ts
parentde4c3dcaf172804d34ae708be1ed3e75af42f4d5 (diff)
downloadtanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.tar.gz
tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.tar.bz2
tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.zip
a few small changes
Diffstat (limited to 'src/commands/utilities/decode.ts')
-rw-r--r--src/commands/utilities/decode.ts56
1 files changed, 17 insertions, 39 deletions
diff --git a/src/commands/utilities/decode.ts b/src/commands/utilities/decode.ts
index 7f0c7d4..76f735b 100644
--- a/src/commands/utilities/decode.ts
+++ b/src/commands/utilities/decode.ts
@@ -10,61 +10,39 @@ export default class DecodeCommand extends BushCommand {
super('decode', {
aliases: ['decode', 'encode'],
category: 'utilities',
- description: {
- content: 'Decode / encode.',
- usage: ['decode <from> <to> <data>'],
- examples: ['decode base64 ascii TmVyZApJbWFnaW5lIGRlY29kaW5nIHRoaXMgbG1hbw==']
- },
+ description: 'Decode / encode.',
+ usage: ['decode <from> <to> <data>'],
+ examples: ['decode base64 ascii TmVyZApJbWFnaW5lIGRlY29kaW5nIHRoaXMgbG1hbw=='],
args: [
{
id: 'from',
+ description: 'The type of data you are inputting.',
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.`
- }
+ prompt: 'What is the encoding of the original data?',
+ retry: `{error} Choose one of the following ${encodingTypesString} for the encoding of the original data.`,
+ slashType: 'STRING',
+ choices: encodingTypesArray.map((e) => ({ name: e, value: e }))
},
{
id: 'to',
+ description: 'The type of data you want the output to be.',
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.`
- }
+ prompt: '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.`,
+ slashType: 'STRING',
+ choices: encodingTypesArray.map((e) => ({ name: e, value: e }))
},
{
id: 'data',
+ description: 'What you would like to decode.',
type: 'string',
match: 'restContent',
- prompt: {
- start: 'What would you to decode.',
- retry: '{error} Choose a valid string to decode.'
- }
+ prompt: 'What would you to decode.',
+ retry: '{error} Choose a valid string to decode.',
+ slashType: 'STRING'
}
],
slash: true,
- slashOptions: [
- {
- name: 'from',
- description: 'The type of data you are inputting.',
- type: 'STRING',
- choices: encodingTypesArray.map((e) => ({ name: e, value: e })),
- required: true
- },
- {
- name: 'to',
- description: 'The type of data you want the output to be.',
- type: 'STRING',
- choices: encodingTypesArray.map((e) => ({ name: e, value: e })),
- required: true
- },
- {
- name: 'data',
- description: 'What you would like to decode.',
- type: 'STRING',
- required: true
- }
- ],
clientPermissions: (m) => util.clientSendAndPermCheck(m),
userPermissions: []
});