aboutsummaryrefslogtreecommitdiff
path: root/src/commands/dev
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-26 20:07:19 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-26 20:07:19 -0400
commited59b7f1827ab93573b079144c3eeaa01ce40492 (patch)
tree7ceac6d61a8a25586ab9bbaf7acfbade91c97132 /src/commands/dev
parentc0a81b014a56e4d44c826f78391a930361aab122 (diff)
downloadtanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.tar.gz
tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.tar.bz2
tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.zip
clean up, bug fixes
Diffstat (limited to 'src/commands/dev')
-rw-r--r--src/commands/dev/__template.ts5
-rw-r--r--src/commands/dev/eval.ts8
-rw-r--r--src/commands/dev/reload.ts4
-rw-r--r--src/commands/dev/say.ts6
-rw-r--r--src/commands/dev/servers.ts4
-rw-r--r--src/commands/dev/sh.ts4
-rw-r--r--src/commands/dev/superUser.ts4
-rw-r--r--src/commands/dev/test.ts4
8 files changed, 19 insertions, 20 deletions
diff --git a/src/commands/dev/__template.ts b/src/commands/dev/__template.ts
index b9d9114..0d25766 100644
--- a/src/commands/dev/__template.ts
+++ b/src/commands/dev/__template.ts
@@ -7,7 +7,7 @@ export default class TemplateCommand extends BushCommand {
category: 'template',
description: {
content: 'Command description.',
- usage: 'template <requiredArg> [optionalArg]',
+ usage: ['template <requiredArg> [optionalArg]'],
examples: ['template 1 2']
},
args: [
@@ -53,11 +53,10 @@ export default class TemplateCommand extends BushCommand {
userPermissions: []
});
}
-
public override async exec(
message: BushMessage | BushSlashMessage,
args: { required_argument: string; optional_argument: string }
- ): Promise<unknown> {
+ ) {
return await message.util.reply(`${util.emojis.error} Do not use the template command.`);
args;
}
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index 46fe889..5bb99e7 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -11,7 +11,7 @@ export default class EvalCommand extends BushCommand {
category: 'dev',
description: {
content: 'Evaluate code.',
- usage: 'eval <code> [--depth #] [--sudo] [--silent] [--delete] [--proto] [--hidden] [--ts]',
+ usage: ['eval <code> [--depth #] [--sudo] [--silent] [--delete] [--proto] [--hidden] [--ts]'],
examples: ['eval message.channel.delete()']
},
args: [
@@ -64,7 +64,7 @@ export default class EvalCommand extends BushCommand {
show_proto: boolean;
show_methods: boolean;
}
- ): Promise<unknown> {
+ ) {
if (!message.author.isOwner())
return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`);
if (message.util.isSlashMessage(message)) {
@@ -161,9 +161,9 @@ export default class EvalCommand extends BushCommand {
} else {
try {
await message.author.send({ embeds: [embed] });
- if (!args.deleteMSG) await message.react(emojis.successFull);
+ if (!args.deleteMSG) await (message as BushMessage).react(emojis.successFull);
} catch {
- if (!args.deleteMSG) await message.react(emojis.errorFull);
+ if (!args.deleteMSG) await (message as BushMessage).react(emojis.errorFull);
}
}
if (args.deleteMSG && (message as BushMessage).deletable) await (message as BushMessage).delete();
diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts
index 43b8ab6..a95106f 100644
--- a/src/commands/dev/reload.ts
+++ b/src/commands/dev/reload.ts
@@ -7,7 +7,7 @@ export default class ReloadCommand extends BushCommand {
category: 'dev',
description: {
content: 'Reloads the bot',
- usage: 'reload',
+ usage: ['reload'],
examples: ['reload']
},
// args: [
@@ -33,7 +33,7 @@ export default class ReloadCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage | BushSlashMessage /* { fast }: { fast: boolean } */): Promise<unknown> {
+ public override async exec(message: BushMessage | BushSlashMessage /* { fast }: { fast: boolean } */) {
if (!message.author.isOwner())
return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`);
diff --git a/src/commands/dev/say.ts b/src/commands/dev/say.ts
index f1695f8..947f3c2 100644
--- a/src/commands/dev/say.ts
+++ b/src/commands/dev/say.ts
@@ -8,7 +8,7 @@ export default class SayCommand extends BushCommand {
category: 'dev',
description: {
content: 'A command make the bot say something.',
- usage: 'say <message>',
+ usage: ['say <message>'],
examples: ['say hello']
},
args: [
@@ -27,7 +27,7 @@ export default class SayCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage, args: { content: string }): Promise<unknown> {
+ public override async exec(message: BushMessage, args: { content: string }) {
if (!message.author.isOwner())
return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`);
@@ -35,7 +35,7 @@ export default class SayCommand extends BushCommand {
await message.util.send({ content: args.content, allowedMentions: AllowedMentions.none() }).catch(() => null);
}
- public override async execSlash(message: AkairoMessage, args: { content: string }): Promise<unknown> {
+ public override async execSlash(message: AkairoMessage, args: { content: string }) {
if (!client.config.owners.includes(message.author.id)) {
return await message.interaction.reply({
content: `${util.emojis.error} Only my developers can run this command.`,
diff --git a/src/commands/dev/servers.ts b/src/commands/dev/servers.ts
index 5097695..e26d2c7 100644
--- a/src/commands/dev/servers.ts
+++ b/src/commands/dev/servers.ts
@@ -8,7 +8,7 @@ export default class ServersCommand extends BushCommand {
category: 'dev',
description: {
content: 'Displays all the severs the bot is in',
- usage: 'servers',
+ usage: ['servers'],
examples: ['servers']
},
clientPermissions: (m) => util.clientSendAndPermCheck(m),
@@ -17,7 +17,7 @@ export default class ServersCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> {
+ public override async exec(message: BushMessage | BushSlashMessage) {
const guilds = [...client.guilds.cache.sort((a, b) => (a.memberCount < b.memberCount ? 1 : -1)).values()];
const chunkedGuilds: Guild[][] = util.chunk(guilds, 10);
const embeds: MessageEmbedOptions[] = chunkedGuilds.map((chunk) => {
diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts
index 3fca2b2..11cd28d 100644
--- a/src/commands/dev/sh.ts
+++ b/src/commands/dev/sh.ts
@@ -19,7 +19,7 @@ export default class ShCommand extends BushCommand {
category: 'dev',
description: {
content: 'Run shell commands.',
- usage: 'sh <command>',
+ usage: ['sh <command>'],
examples: ['sh git pull']
},
args: [
@@ -39,7 +39,7 @@ export default class ShCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage | BushSlashMessage, { command }: { command: string }): Promise<unknown> {
+ public override async exec(message: BushMessage | BushSlashMessage, { command }: { command: string }) {
if (!client.config.owners.includes(message.author.id))
return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`);
const input = clean(command);
diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts
index fcdec53..147a6c4 100644
--- a/src/commands/dev/superUser.ts
+++ b/src/commands/dev/superUser.ts
@@ -9,7 +9,7 @@ export default class SuperUserCommand extends BushCommand {
category: 'dev',
description: {
content: 'A command to manage superusers.',
- usage: 'superuser <add/remove> <user>',
+ usage: ['superuser <add/remove> <user>'],
examples: ['superuser add IRONM00N']
},
clientPermissions: (m) => util.clientSendAndPermCheck(m),
@@ -44,7 +44,7 @@ export default class SuperUserCommand extends BushCommand {
public override async exec(
message: BushMessage | BushSlashMessage,
{ action, user }: { action: 'add' | 'remove'; user: User }
- ): Promise<unknown> {
+ ) {
if (!message.author.isOwner())
return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`);
diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts
index 2ab266d..e3aa20d 100644
--- a/src/commands/dev/test.ts
+++ b/src/commands/dev/test.ts
@@ -15,7 +15,7 @@ export default class TestCommand extends BushCommand {
category: 'dev',
description: {
content: 'A command to stuff.',
- usage: 'test [feature]',
+ usage: ['test [feature]'],
examples: ['test lots of buttons', 'test buttons']
},
args: [
@@ -36,7 +36,7 @@ export default class TestCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage, args: { feature: string }): Promise<unknown> {
+ public override async exec(message: BushMessage, args: { feature: string }) {
const responses = [
'Yes master.',
'Test it your self bitch, I am hungry.',