aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-05 18:26:55 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-05 18:26:55 -0400
commitf4ed3141722719f26ac2286d57a92b1031accaf3 (patch)
tree9d08f8e52d6dd56dd53a5fdbe585d6147db4c795 /src/commands
parentad2077fa157d49c1099f21ac2effe05903c39035 (diff)
downloadtanzanite-f4ed3141722719f26ac2286d57a92b1031accaf3.tar.gz
tanzanite-f4ed3141722719f26ac2286d57a92b1031accaf3.tar.bz2
tanzanite-f4ed3141722719f26ac2286d57a92b1031accaf3.zip
a few fixes and stuff
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/moderation/purge.ts1
-rw-r--r--src/commands/moderation/role.ts2
-rw-r--r--src/commands/utilities/decode.ts11
3 files changed, 9 insertions, 5 deletions
diff --git a/src/commands/moderation/purge.ts b/src/commands/moderation/purge.ts
index f4a53a8..4f1a5a6 100644
--- a/src/commands/moderation/purge.ts
+++ b/src/commands/moderation/purge.ts
@@ -52,6 +52,7 @@ export default class PurgeCommand extends BushCommand {
if (args.bot) {
shouldFilter.push(filterMessage.author.bot);
}
+ return shouldFilter.filter((bool) => bool === false).length === 0;
};
const purged = await message.channel.bulkDelete(messages, true).catch(() => {});
diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts
index 1371ee8..0118f22 100644
--- a/src/commands/moderation/role.ts
+++ b/src/commands/moderation/role.ts
@@ -32,7 +32,7 @@ export default class RoleCommand extends BushCommand {
id: 'role',
type: 'role',
prompt: {
- start: `What role do you want to add/remove to/from the user.?`,
+ start: `What role do you want to add/remove to/from the user?`,
retry: `{error} Choose a valid role to add/remove.`
}
},
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));