aboutsummaryrefslogtreecommitdiff
path: root/src/commands/utilities/decode.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/utilities/decode.ts')
-rw-r--r--src/commands/utilities/decode.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/commands/utilities/decode.ts b/src/commands/utilities/decode.ts
index 3fb340d..9f56cfc 100644
--- a/src/commands/utilities/decode.ts
+++ b/src/commands/utilities/decode.ts
@@ -60,7 +60,8 @@ export default class DecodeCommand extends BushCommand {
{ name: 'latin1', value: 'latin1' },
{ name: 'binary', value: 'binary' },
{ name: 'hex', value: 'hex' }
- ]
+ ],
+ required: true
},
{
name: 'to',
@@ -77,12 +78,14 @@ export default class DecodeCommand extends BushCommand {
{ name: 'latin1', value: 'latin1' },
{ name: 'binary', value: 'binary' },
{ name: 'hex', value: 'hex' }
- ]
+ ],
+ required: true
},
{
name: 'data',
description: 'What you would like to decode.',
- type: 'STRING'
+ type: 'STRING',
+ required: true
}
]
});
@@ -92,7 +95,7 @@ export default class DecodeCommand extends BushCommand {
message: BushMessage | AkairoMessage,
{ from, to, data }: { from: BufferEncoding; to: BufferEncoding; data: string }
): Promise<unknown> {
- const encodeOrDecode = util.capitalizeFirstLetter(message?.util?.parsed?.alias) || 'Decoded';
+ const encodeOrDecode = util.capitalizeFirstLetter(message?.util?.parsed?.alias || 'decoded');
const decodedEmbed = new MessageEmbed()
.setTitle(`${encodeOrDecode} Information`)
.addField('📥 Input', await util.inspectCleanRedactCodeblock(data, null));