aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/common/AutoMod.ts2
-rw-r--r--src/lib/common/ButtonPaginator.ts2
-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
-rw-r--r--src/lib/utils/BushLogger.ts12
6 files changed, 20 insertions, 14 deletions
diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts
index adc629a..38c488b 100644
--- a/src/lib/common/AutoMod.ts
+++ b/src/lib/common/AutoMod.ts
@@ -15,7 +15,7 @@ export class AutoMod {
void this.handle();
}
- private async handle(): Promise<void> {
+ private async handle() {
if (this.message.channel.type === 'DM' || !this.message.guild) return;
if (!(await this.message.guild.hasFeature('automod'))) return;
diff --git a/src/lib/common/ButtonPaginator.ts b/src/lib/common/ButtonPaginator.ts
index 6d4c49a..da595d5 100644
--- a/src/lib/common/ButtonPaginator.ts
+++ b/src/lib/common/ButtonPaginator.ts
@@ -31,7 +31,7 @@ export class ButtonPaginator {
text: string | null = null,
deleteOnExit = true,
startOn = 1
- ): Promise<void> {
+ ) {
// no need to paginate if there is only one page
if (embeds.length === 1) return DeleteButton.send(message, { embeds: embeds });
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;
diff --git a/src/lib/utils/BushLogger.ts b/src/lib/utils/BushLogger.ts
index f00c19c..2aaba5b 100644
--- a/src/lib/utils/BushLogger.ts
+++ b/src/lib/utils/BushLogger.ts
@@ -62,7 +62,7 @@ export class BushLogger {
}
/** Sends a message to the log channel */
- public static async channelLog(message: BushSendMessageType): Promise<void> {
+ public static async channelLog(message: BushSendMessageType) {
const channel = await util.getConfigChannel('log');
await channel.send(message).catch(() => {});
}
@@ -100,7 +100,7 @@ export class BushLogger {
* @param sendChannel - Should this also be logged to discord? Defaults to false.
* @param depth - The depth the content will inspected. Defaults to 0.
*/
- public static async verbose(header: string, content: any, sendChannel = false, depth = 0): Promise<void> {
+ public static async verbose(header: string, content: any, sendChannel = false, depth = 0) {
if (!client.config.logging.verbose) return;
const newContent = this.#inspectContent(content, depth, true);
console.info(
@@ -121,7 +121,7 @@ export class BushLogger {
* @param sendChannel - Should this also be logged to discord? Defaults to false.
* @param depth - The depth the content will inspected. Defaults to 0.
*/
- public static async info(header: string, content: any, sendChannel = true, depth = 0): Promise<void> {
+ public static async info(header: string, content: any, sendChannel = true, depth = 0) {
if (!client.config.logging.info) return;
const newContent = this.#inspectContent(content, depth, true);
console.info(
@@ -142,7 +142,7 @@ export class BushLogger {
* @param sendChannel - Should this also be logged to discord? Defaults to false.
* @param depth - The depth the content will inspected. Defaults to 0.
*/
- public static async warn(header: string, content: any, sendChannel = true, depth = 0): Promise<void> {
+ public static async warn(header: string, content: any, sendChannel = true, depth = 0) {
const newContent = this.#inspectContent(content, depth, true);
console.warn(
`${chalk.bgYellow(this.#getTimeStamp())} ${chalk.yellow(`[${header}]`)} ${this.#parseFormatting(
@@ -166,7 +166,7 @@ export class BushLogger {
* @param sendChannel - Should this also be logged to discord? Defaults to false.
* @param depth - The depth the content will inspected. Defaults to 0.
*/
- public static async error(header: string, content: any, sendChannel = true, depth = 0): Promise<void> {
+ public static async error(header: string, content: any, sendChannel = true, depth = 0) {
const newContent = this.#inspectContent(content, depth, true);
console.error(
`${chalk.bgRedBright(this.#getTimeStamp())} ${chalk.redBright(`[${header}]`)} ${this.#parseFormatting(
@@ -190,7 +190,7 @@ export class BushLogger {
* @param sendChannel - Should this also be logged to discord? Defaults to false.
* @param depth - The depth the content will inspected. Defaults to 0.
*/
- public static async success(header: string, content: any, sendChannel = true, depth = 0): Promise<void> {
+ public static async success(header: string, content: any, sendChannel = true, depth = 0) {
const newContent = this.#inspectContent(content, depth, true);
console.log(
`${chalk.bgGreen(this.#getTimeStamp())} ${chalk.greenBright(`[${header}]`)} ${this.#parseFormatting(