diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/extensions/BotInhibitor.ts | 6 | ||||
-rw-r--r-- | src/lib/extensions/BotListener.ts | 6 | ||||
-rw-r--r-- | src/lib/extensions/BotTask.ts | 6 | ||||
-rw-r--r-- | src/lib/extensions/BushClient.ts (renamed from src/lib/extensions/BotClient.ts) | 2 | ||||
-rw-r--r-- | src/lib/extensions/BushCommand.ts (renamed from src/lib/extensions/BotCommand.ts) | 10 | ||||
-rw-r--r-- | src/lib/extensions/BushInhibitor.ts | 6 | ||||
-rw-r--r-- | src/lib/extensions/BushListener.ts | 6 | ||||
-rw-r--r-- | src/lib/extensions/BushTask.ts | 6 | ||||
-rw-r--r-- | src/lib/extensions/Util.ts | 24 | ||||
-rw-r--r-- | src/lib/models/Guild.ts | 4 | ||||
-rw-r--r-- | src/lib/utils/Logger.ts | 6 |
11 files changed, 41 insertions, 41 deletions
diff --git a/src/lib/extensions/BotInhibitor.ts b/src/lib/extensions/BotInhibitor.ts deleted file mode 100644 index 960aade..0000000 --- a/src/lib/extensions/BotInhibitor.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Inhibitor } from 'discord-akairo'; -import { BotClient } from './BotClient'; - -export class BotInhibitor extends Inhibitor { - public client: BotClient; -} diff --git a/src/lib/extensions/BotListener.ts b/src/lib/extensions/BotListener.ts deleted file mode 100644 index 9ec17b2..0000000 --- a/src/lib/extensions/BotListener.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Listener } from 'discord-akairo'; -import { BotClient } from './BotClient'; - -export class BotListener extends Listener { - public client: BotClient; -} diff --git a/src/lib/extensions/BotTask.ts b/src/lib/extensions/BotTask.ts deleted file mode 100644 index 4d5cdcd..0000000 --- a/src/lib/extensions/BotTask.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Task } from 'discord-akairo'; -import { BotClient } from './BotClient'; - -export class BotTask extends Task { - public client: BotClient; -} diff --git a/src/lib/extensions/BotClient.ts b/src/lib/extensions/BushClient.ts index c98f50d..8a8ae91 100644 --- a/src/lib/extensions/BotClient.ts +++ b/src/lib/extensions/BushClient.ts @@ -18,7 +18,7 @@ import chalk from 'chalk'; export type BotConfig = typeof config; -export class BotClient extends AkairoClient { +export class BushClient extends AkairoClient { public config: BotConfig; public listenerHandler: ListenerHandler; public inhibitorHandler: InhibitorHandler; diff --git a/src/lib/extensions/BotCommand.ts b/src/lib/extensions/BushCommand.ts index c5d31e9..4f9dc6e 100644 --- a/src/lib/extensions/BotCommand.ts +++ b/src/lib/extensions/BushCommand.ts @@ -1,8 +1,8 @@ import { Command, CommandOptions } from 'discord-akairo'; import { APIApplicationCommandOption } from 'discord-api-types'; -import { BotClient } from './BotClient'; +import { BushClient } from './BushClient'; -export interface BotCommandOptions extends CommandOptions { +export interface BushCommandOptions extends CommandOptions { slashCommandOptions?: APIApplicationCommandOption[]; description: { content: string; @@ -11,9 +11,9 @@ export interface BotCommandOptions extends CommandOptions { }; } -export class BotCommand extends Command { - public client: BotClient; - constructor(id: string, options?: BotCommandOptions) { +export class BushCommand extends Command { + public client: BushClient; + constructor(id: string, options?: BushCommandOptions) { super(id, options); this.options = options; } diff --git a/src/lib/extensions/BushInhibitor.ts b/src/lib/extensions/BushInhibitor.ts new file mode 100644 index 0000000..d9a9b68 --- /dev/null +++ b/src/lib/extensions/BushInhibitor.ts @@ -0,0 +1,6 @@ +import { Inhibitor } from 'discord-akairo'; +import { BushClient } from './BushClient'; + +export class BushInhibitor extends Inhibitor { + public client: BushClient; +} diff --git a/src/lib/extensions/BushListener.ts b/src/lib/extensions/BushListener.ts new file mode 100644 index 0000000..6a13210 --- /dev/null +++ b/src/lib/extensions/BushListener.ts @@ -0,0 +1,6 @@ +import { Listener } from 'discord-akairo'; +import { BushClient } from './BushClient'; + +export class BushListener extends Listener { + public client: BushClient; +} diff --git a/src/lib/extensions/BushTask.ts b/src/lib/extensions/BushTask.ts new file mode 100644 index 0000000..21655e9 --- /dev/null +++ b/src/lib/extensions/BushTask.ts @@ -0,0 +1,6 @@ +import { Task } from 'discord-akairo'; +import { BushClient } from './BushClient'; + +export class BushTask extends Task { + public client: BushClient; +} diff --git a/src/lib/extensions/Util.ts b/src/lib/extensions/Util.ts index 54df670..7c1d4b2 100644 --- a/src/lib/extensions/Util.ts +++ b/src/lib/extensions/Util.ts @@ -1,5 +1,5 @@ import { ClientUtil } from 'discord-akairo'; -import { BotClient } from './BotClient'; +import { BushClient } from './BushClient'; import { promisify } from 'util'; import { exec } from 'child_process'; import got from 'got'; @@ -57,9 +57,9 @@ export interface SlashCommandOption<T> { export class Util extends ClientUtil { /** * The client of this ClientUtil - * @type {BotClient} + * @type {BushClient} */ - public client: BotClient; + public client: BushClient; /** * The hastebin urls used to post to hastebin, attempts to post in order * @type {string[]} @@ -83,7 +83,7 @@ export class Util extends ClientUtil { * Creates this client util * @param client The client to initialize with */ - constructor(client: BotClient) { + constructor(client: BushClient) { super(client); } @@ -273,14 +273,14 @@ export class Util extends ClientUtil { } } - for (const [, botCommand] of this.client.commandHandler.modules) { - if (botCommand.execSlash) { - const found = registered.find((i) => i.name == botCommand.id); + for (const [, BushCommand] of this.client.commandHandler.modules) { + if (BushCommand.execSlash) { + const found = registered.find((i) => i.name == BushCommand.id); const slashdata = { - name: botCommand.id, - description: botCommand.description.content, - options: botCommand.options.slashCommandOptions + name: BushCommand.id, + description: BushCommand.description.content, + options: BushCommand.options.slashCommandOptions }; if (found?.id && !force) { @@ -292,7 +292,7 @@ export class Util extends ClientUtil { ) : fetchedGuild.commands.edit(found.id, slashdata); this.client.logger.verbose( - chalk`{yellow Edited slash command ${botCommand.id}${ + chalk`{yellow Edited slash command ${BushCommand.id}${ guild !== undefined ? ` in guild ${fetchedGuild.name}` : '' }}` ); @@ -302,7 +302,7 @@ export class Util extends ClientUtil { ? await this.client.application.commands.create(slashdata) : fetchedGuild.commands.create(slashdata); this.client.logger.verbose( - chalk`{green Created slash command ${botCommand.id}${ + chalk`{green Created slash command ${BushCommand.id}${ guild !== undefined ? ` in guild ${fetchedGuild.name}` : '' }}` ); diff --git a/src/lib/models/Guild.ts b/src/lib/models/Guild.ts index 1cb3abb..c224bf5 100644 --- a/src/lib/models/Guild.ts +++ b/src/lib/models/Guild.ts @@ -1,5 +1,5 @@ import { DataTypes, Optional, Sequelize } from 'sequelize'; -import { BotClient } from '../extensions/BotClient'; +import { BushClient } from '../extensions/BushClient'; import { BaseModel } from './BaseModel'; export interface GuildModel { @@ -14,7 +14,7 @@ export class Guild { id: string; prefix: string; - static initModel(seqeulize: Sequelize, client: BotClient): void { + static initModel(seqeulize: Sequelize, client: BushClient): void { Guild.init( { id: { diff --git a/src/lib/utils/Logger.ts b/src/lib/utils/Logger.ts index f38365e..604b45e 100644 --- a/src/lib/utils/Logger.ts +++ b/src/lib/utils/Logger.ts @@ -1,10 +1,10 @@ import { TextChannel } from 'discord.js'; -import { BotClient } from '../extensions/BotClient'; +import { BushClient } from '../extensions/BushClient'; import chalk from 'chalk'; export class Logger { - private client: BotClient; - public constructor(client: BotClient) { + private client: BushClient; + public constructor(client: BushClient) { this.client = client; } private stripColor(text: string): string { |