aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord-akairo
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/lib/extensions/discord-akairo
parentc0a81b014a56e4d44c826f78391a930361aab122 (diff)
downloadtanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.tar.gz
tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.tar.bz2
tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.zip
clean up, bug fixes
Diffstat (limited to 'src/lib/extensions/discord-akairo')
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts6
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts2
-rw-r--r--src/lib/extensions/discord-akairo/BushCommand.ts10
3 files changed, 12 insertions, 6 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index 6133dba..32f43be 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -296,7 +296,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
}
// Initialize everything
- async #init(): Promise<void> {
+ async #init() {
this.commandHandler.useListenerHandler(this.listenerHandler);
this.commandHandler.useInhibitorHandler(this.inhibitorHandler);
this.commandHandler.ignorePermissions = this.config.owners;
@@ -344,7 +344,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
this.stats.commandsUsed = await UpdateStatsTask.init();
}
- public async dbPreInit(): Promise<void> {
+ public async dbPreInit() {
try {
await this.db.authenticate();
Global.initModel(this.db);
@@ -369,7 +369,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
/**
* Starts the bot
*/
- public async start(): Promise<void> {
+ public async start() {
eventsIntercept.patch(this);
//@ts-expect-error: no typings
this.intercept('ready', async (arg, done) => {
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index a833c75..32081ed 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -510,7 +510,7 @@ export class BushClientUtil extends ClientUtil {
/**
* Wait an amount in seconds.
*/
- public async sleep(s: number): Promise<unknown> {
+ public async sleep(s: number) {
return new Promise((resolve) => setTimeout(resolve, s * 1000));
}
diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts
index 22d4aae..e3066aa 100644
--- a/src/lib/extensions/discord-akairo/BushCommand.ts
+++ b/src/lib/extensions/discord-akairo/BushCommand.ts
@@ -148,8 +148,8 @@ export interface BushCommandOptions extends Omit<CommandOptions, 'userPermission
restrictedGuilds?: Snowflake[];
description: {
content: string;
- usage: string | string[];
- examples: string | string[];
+ usage: string[];
+ examples: string[];
};
args?: BushArgumentOptions[] & CustomBushArgumentOptions[];
category: string;
@@ -168,6 +168,12 @@ export class BushCommand extends Command {
public declare handler: BushCommandHandler;
+ public declare description: {
+ content: string;
+ usage: string[];
+ examples: string[];
+ };
+
/** The command's options */
public options: BushCommandOptions;