diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-06-29 20:48:27 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-06-29 20:48:27 -0400 |
commit | fd675ca9d60cc06d892ebc36a1b9624f15233f20 (patch) | |
tree | 0c510afb64eb2c6f45c15c7e22148c6e7f7ed2d7 /src | |
parent | 921b07f9716fdd413ec89c4a40419a6e2d39824b (diff) | |
download | tanzanite-fd675ca9d60cc06d892ebc36a1b9624f15233f20.tar.gz tanzanite-fd675ca9d60cc06d892ebc36a1b9624f15233f20.tar.bz2 tanzanite-fd675ca9d60cc06d892ebc36a1b9624f15233f20.zip |
don't judge part 1
Diffstat (limited to 'src')
79 files changed, 384 insertions, 150 deletions
diff --git a/src/arguments/duration.ts b/src/arguments/duration.ts index 7b7a922..6007b4e 100644 --- a/src/arguments/duration.ts +++ b/src/arguments/duration.ts @@ -1,5 +1,5 @@ -import { BushArgumentTypeCaster } from '../lib/extensions/BushArgumentTypeCaster'; -import { BushMessage } from '../lib/extensions/BushMessage'; +import { BushArgumentTypeCaster } from '../lib/extensions/discord-akairo/BushArgumentTypeCaster'; +import { BushMessage } from '../lib/extensions/discord.js/BushMessage'; import { BushConstants } from '../lib/utils/BushConstants'; export const durationTypeCaster: BushArgumentTypeCaster = async (_message: BushMessage, phrase): Promise<number> => { @@ -1,5 +1,5 @@ -import { BushClient } from './lib/extensions/BushClient'; import * as config from './config/options'; +import { BushClient } from './lib/extensions/discord-akairo/BushClient'; const client: BushClient = new BushClient(config); client.start(); diff --git a/src/commands/config/muteRole.ts b/src/commands/config/muteRole.ts index 2dc34c3..2b2f938 100644 --- a/src/commands/config/muteRole.ts +++ b/src/commands/config/muteRole.ts @@ -1,7 +1,7 @@ import { Role } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; import AllowedMentions from '../../lib/utils/AllowedMentions'; export default class MuteRoleCommand extends BushCommand { diff --git a/src/commands/config/prefix.ts b/src/commands/config/prefix.ts index b788d17..1551205 100644 --- a/src/commands/config/prefix.ts +++ b/src/commands/config/prefix.ts @@ -1,6 +1,6 @@ -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class PrefixCommand extends BushCommand { constructor() { diff --git a/src/commands/config/welcomeChannel.ts b/src/commands/config/welcomeChannel.ts index d531c7d..2d66a25 100644 --- a/src/commands/config/welcomeChannel.ts +++ b/src/commands/config/welcomeChannel.ts @@ -1,7 +1,7 @@ import { Channel } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class WelcomeChannelCommand extends BushCommand { public constructor() { diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts index a1c2d87..fc6e7e8 100644 --- a/src/commands/dev/eval.ts +++ b/src/commands/dev/eval.ts @@ -4,9 +4,9 @@ import { Constants } from 'discord-akairo'; import { CommandInteraction, MessageEmbed, MessageEmbedOptions, Util } from 'discord.js'; import { transpile } from 'typescript'; import { inspect, promisify } from 'util'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; const clean = (text) => { if (typeof text === 'string') { @@ -135,8 +135,8 @@ export default class EvalCommand extends BushCommand { show_proto: boolean; } ): Promise<unknown> { - // if (!message.author.isOwner()) - // return await message.util.reply(`${this.client.util.emojis.error} Only my developers can run this command.`); + if (!message.author.isOwner()) + return await message.util.reply(`${this.client.util.emojis.error} Only my developers can run this command.`); if (message.util.isSlash) { await (message as BushSlashMessage).interaction.defer({ ephemeral: args.silent }); } diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts index 656bb34..82dde4c 100644 --- a/src/commands/dev/reload.ts +++ b/src/commands/dev/reload.ts @@ -1,6 +1,6 @@ -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class ReloadCommand extends BushCommand { constructor() { diff --git a/src/commands/dev/setLevel.ts b/src/commands/dev/setLevel.ts index 6c8131a..9903013 100644 --- a/src/commands/dev/setLevel.ts +++ b/src/commands/dev/setLevel.ts @@ -1,7 +1,7 @@ import { User } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; import { Level } from '../../lib/models'; import AllowedMentions from '../../lib/utils/AllowedMentions'; diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts index 773209c..8bbc391 100644 --- a/src/commands/dev/superUser.ts +++ b/src/commands/dev/superUser.ts @@ -1,7 +1,7 @@ import { Constants } from 'discord-akairo'; import { User } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; import { Global } from '../../lib/models'; export default class SuperUserCommand extends BushCommand { diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts index 3db4151..b77a271 100644 --- a/src/commands/info/botInfo.ts +++ b/src/commands/info/botInfo.ts @@ -1,6 +1,6 @@ import { Message, MessageEmbed } from 'discord.js'; import { duration } from 'moment'; -import { BushCommand } from '../../lib/extensions/BushCommand'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; export default class BotInfoCommand extends BushCommand { constructor() { diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index b58d73c..6e14d96 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -1,7 +1,7 @@ import { MessageActionRow, MessageButton, MessageEmbed } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class HelpCommand extends BushCommand { constructor() { diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts index 6584ab5..45cfd22 100644 --- a/src/commands/info/ping.ts +++ b/src/commands/info/ping.ts @@ -1,6 +1,6 @@ import { Message, MessageEmbed } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; export default class PingCommand extends BushCommand { constructor() { diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts index 60d0c1a..538ec64 100644 --- a/src/commands/info/pronouns.ts +++ b/src/commands/info/pronouns.ts @@ -1,7 +1,7 @@ import { Message, MessageEmbed, User } from 'discord.js'; import got, { HTTPError } from 'got'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; export const pronounMapping = { unspecified: 'Unspecified', diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index 7ce222a..9df1c2a 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -1,7 +1,7 @@ import { Argument } from 'discord-akairo'; import { CommandInteraction, Message, User } from 'discord.js'; import moment from 'moment'; -import { BushCommand } from '../../lib/extensions/BushCommand'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; import { Ban, Guild, ModLog, ModLogType } from '../../lib/models'; /* const durationAliases: Record<string, string[]> = { diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index 748753f..a666c8e 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -1,6 +1,6 @@ import { CommandInteraction, GuildMember, Message } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; import { Guild, ModLog, ModLogType } from '../../lib/models'; export default class KickCommand extends BushCommand { diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index e32df42..27018f1 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -2,7 +2,7 @@ import { stripIndent } from 'common-tags'; import { Argument } from 'discord-akairo'; import { Message, MessageEmbed } from 'discord.js'; import moment from 'moment'; -import { BushCommand } from '../../lib/extensions/BushCommand'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; import { ModLog } from '../../lib/models'; export default class ModlogCommand extends BushCommand { diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 9b6ad70..88fcc69 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -1,7 +1,7 @@ import { Argument } from 'discord-akairo'; import { CommandInteraction, Message, User } from 'discord.js'; import moment from 'moment'; -import { BushCommand } from '../../lib/extensions/BushCommand'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; import { Guild, ModLog, ModLogType, Mute } from '../../lib/models'; export default class MuteCommand extends BushCommand { diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index f0918f0..d1f8e00 100644 --- a/src/commands/moderation/role.ts +++ b/src/commands/moderation/role.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { GuildMember, Message, Role } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; import AllowedMentions from '../../lib/utils/AllowedMentions'; export default class RoleCommand extends BushCommand { diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts index d48049b..c146db0 100644 --- a/src/commands/moderation/warn.ts +++ b/src/commands/moderation/warn.ts @@ -1,5 +1,5 @@ import { GuildMember, Message } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; import { Guild, ModLog, ModLogType } from '../../lib/models'; export default class WarnCommand extends BushCommand { diff --git a/src/commands/moulberry-bush/capePerms.ts b/src/commands/moulberry-bush/capePerms.ts index d1850c8..b6508d0 100644 --- a/src/commands/moulberry-bush/capePerms.ts +++ b/src/commands/moulberry-bush/capePerms.ts @@ -1,8 +1,8 @@ import { Constants } from 'discord-akairo'; import { MessageEmbed } from 'discord.js'; import got from 'got'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class CapePermissionsCommand extends BushCommand { private nameMap = { diff --git a/src/commands/moulberry-bush/giveawayPing.ts b/src/commands/moulberry-bush/giveawayPing.ts index 19163d7..40f782d 100644 --- a/src/commands/moulberry-bush/giveawayPing.ts +++ b/src/commands/moulberry-bush/giveawayPing.ts @@ -1,5 +1,5 @@ -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; import AllowedMentions from '../../lib/utils/AllowedMentions'; export default class GiveawayPingCommand extends BushCommand { diff --git a/src/commands/moulberry-bush/level.ts b/src/commands/moulberry-bush/level.ts index e37fa2e..c81c555 100644 --- a/src/commands/moulberry-bush/level.ts +++ b/src/commands/moulberry-bush/level.ts @@ -1,6 +1,6 @@ import { Message, User } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; import { Level } from '../../lib/models'; /* import canvas from 'canvas'; diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts index 9aa41e0..2bcbb8d 100644 --- a/src/commands/moulberry-bush/rule.ts +++ b/src/commands/moulberry-bush/rule.ts @@ -1,7 +1,7 @@ import { Argument, Constants } from 'discord-akairo'; import { MessageEmbed, User } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushMessage } from '../../lib/extensions/BushMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; import AllowedMentions from '../../lib/utils/AllowedMentions'; const rules = [ diff --git a/src/inhibitors/blacklist/guildBlacklist.ts b/src/inhibitors/blacklist/guildBlacklist.ts index 4c541e8..103e89b 100644 --- a/src/inhibitors/blacklist/guildBlacklist.ts +++ b/src/inhibitors/blacklist/guildBlacklist.ts @@ -1,6 +1,6 @@ -import { BushInhibitor } from '../../lib/extensions/BushInhibitor'; -import { BushMessage } from '../../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushInhibitor } from '../../lib/extensions/discord-akairo/BushInhibitor'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class GuildBlacklistInhibitor extends BushInhibitor { constructor() { diff --git a/src/inhibitors/blacklist/userBlacklist.ts b/src/inhibitors/blacklist/userBlacklist.ts index 73ad846..6772188 100644 --- a/src/inhibitors/blacklist/userBlacklist.ts +++ b/src/inhibitors/blacklist/userBlacklist.ts @@ -1,6 +1,6 @@ -import { BushInhibitor } from '../../lib/extensions/BushInhibitor'; -import { BushMessage } from '../../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushInhibitor } from '../../lib/extensions/discord-akairo/BushInhibitor'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class UserBlacklistInhibitor extends BushInhibitor { constructor() { diff --git a/src/inhibitors/commands/disabledCommand.ts b/src/inhibitors/commands/disabledCommand.ts index caf7bf7..5b47ce3 100644 --- a/src/inhibitors/commands/disabledCommand.ts +++ b/src/inhibitors/commands/disabledCommand.ts @@ -1,7 +1,7 @@ -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushInhibitor } from '../../lib/extensions/BushInhibitor'; -import { BushMessage } from '../../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushInhibitor } from '../../lib/extensions/discord-akairo/BushInhibitor'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class DisabledCommandInhibitor extends BushInhibitor { constructor() { diff --git a/src/inhibitors/noCache.ts b/src/inhibitors/noCache.ts index a8f52d7..fe2e522 100644 --- a/src/inhibitors/noCache.ts +++ b/src/inhibitors/noCache.ts @@ -1,6 +1,6 @@ -import { BushInhibitor } from '../lib/extensions/BushInhibitor'; -import { BushMessage } from '../lib/extensions/BushMessage'; -import { BushSlashMessage } from '../lib/extensions/BushSlashMessage'; +import { BushInhibitor } from '../lib/extensions/discord-akairo/BushInhibitor'; +import { BushSlashMessage } from '../lib/extensions/discord-akairo/BushSlashMessage'; +import { BushMessage } from '../lib/extensions/discord.js/BushMessage'; export default class noCacheInhibitor extends BushInhibitor { constructor() { diff --git a/src/lib/extensions/BushMessage.ts b/src/lib/extensions/BushMessage.ts deleted file mode 100644 index 6293c55..0000000 --- a/src/lib/extensions/BushMessage.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { DMChannel, Message, NewsChannel, Structures, TextChannel } from 'discord.js'; -import { BushClient } from './BushClient'; -import { BushCommandUtil } from './BushCommandUtil'; -import { BushGuild } from './BushGuild'; -import { BushGuildMember } from './BushGuildMember'; -import { BushUser } from './BushUser'; - -export class BushMessage extends Message { - public declare client: BushClient; - public declare util: BushCommandUtil; - public declare guild: BushGuild; - public declare member: BushGuildMember; - public declare author: BushUser; - public constructor(client: BushClient, data: unknown, channel: TextChannel | DMChannel | NewsChannel) { - super(client, data, channel); - this.client = client; - this.channel = channel; - } -} - -Structures.extend('Message', () => BushMessage); diff --git a/src/lib/extensions/BushArgumentOptions.ts b/src/lib/extensions/discord-akairo/BushArgumentOptions.ts index bbbc04b..bbbc04b 100644 --- a/src/lib/extensions/BushArgumentOptions.ts +++ b/src/lib/extensions/discord-akairo/BushArgumentOptions.ts diff --git a/src/lib/extensions/BushArgumentTypeCaster.ts b/src/lib/extensions/discord-akairo/BushArgumentTypeCaster.ts index e000063..9afcf8b 100644 --- a/src/lib/extensions/BushArgumentTypeCaster.ts +++ b/src/lib/extensions/discord-akairo/BushArgumentTypeCaster.ts @@ -1,4 +1,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { BushMessage } from './BushMessage'; +import { BushMessage } from '../discord.js/BushMessage'; export type BushArgumentTypeCaster = (message: BushMessage, phrase: string) => any; diff --git a/src/lib/extensions/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 8dd8277..c18fe80 100644 --- a/src/lib/extensions/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -9,20 +9,25 @@ import { MessagePayload, ReplyMessageOptions, Snowflake, + Structures, UserResolvable } from 'discord.js'; import * as path from 'path'; import { exit } from 'process'; import readline from 'readline'; import { Sequelize } from 'sequelize'; -import { durationTypeCaster } from '../../arguments/duration'; -import * as config from '../../config/options'; -import UpdateCacheTask from '../../tasks/updateCache'; -import * as Models from '../models'; -import AllowedMentions from '../utils/AllowedMentions'; -import { BushCache } from '../utils/BushCache'; -import { BushConstants } from '../utils/BushConstants'; -import { BushLogger } from '../utils/BushLogger'; +import { durationTypeCaster } from '../../../arguments/duration'; +import * as config from '../../../config/options'; +import UpdateCacheTask from '../../../tasks/updateCache'; +import * as Models from '../../models'; +import AllowedMentions from '../../utils/AllowedMentions'; +import { BushCache } from '../../utils/BushCache'; +import { BushConstants } from '../../utils/BushConstants'; +import { BushLogger } from '../../utils/BushLogger'; +import { BushGuild } from '../discord.js/BushGuild'; +import { BushGuildMember } from '../discord.js/BushGuildMember'; +import { BushMessage } from '../discord.js/BushMessage'; +import { BushUser } from '../discord.js/BushUser'; import { BushClientUtil } from './BushClientUtil'; import { BushCommandHandler } from './BushCommandHandler'; import { BushInhibitorHandler } from './BushInhinitorHandler'; @@ -139,6 +144,11 @@ export class BushClient extends AkairoClient { // Initialize everything private async _init(): Promise<void> { + Structures.extend('User', () => BushUser); + Structures.extend('Guild', () => BushGuild); + Structures.extend('GuildMember', () => BushGuildMember); + Structures.extend('Message', () => BushMessage); + this.commandHandler.useListenerHandler(this.listenerHandler); this.commandHandler.useInhibitorHandler(this.inhibitorHandler); this.commandHandler.ignorePermissions = this.config.owners; diff --git a/src/lib/extensions/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index 680f6af..94ad10c 100644 --- a/src/lib/extensions/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -25,10 +25,10 @@ import { } from 'discord.js'; import got from 'got'; import { promisify } from 'util'; -import { Global } from '../models'; -import { BushCache } from '../utils/BushCache'; +import { Global } from '../../models'; +import { BushCache } from '../../utils/BushCache'; +import { BushMessage } from '../discord.js/BushMessage'; import { BushClient } from './BushClient'; -import { BushMessage } from './BushMessage'; interface hastebinRes { key: string; @@ -78,7 +78,7 @@ interface bushColors { } export class BushClientUtil extends ClientUtil { /** The client of this ClientUtil */ - public declare client: BushClient; + public declare readonly client: BushClient; /** The hastebin urls used to post to hastebin, attempts to post in order */ public hasteURLs: string[] = [ 'https://hst.sh', diff --git a/src/lib/extensions/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts index f22a628..b7071b5 100644 --- a/src/lib/extensions/BushCommand.ts +++ b/src/lib/extensions/discord-akairo/BushCommand.ts @@ -2,9 +2,9 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { ArgumentGenerator, ArgumentOptions, ArgumentPromptOptions, Command, CommandOptions } from 'discord-akairo'; import { Snowflake } from 'discord.js'; +import { BushMessage } from '../discord.js/BushMessage'; import { BushClient } from './BushClient'; import { BushCommandHandler } from './BushCommandHandler'; -import { BushMessage } from './BushMessage'; import { BushSlashMessage } from './BushSlashMessage'; export interface BushArgumentOptions extends ArgumentOptions { diff --git a/src/lib/extensions/BushCommandHandler.ts b/src/lib/extensions/discord-akairo/BushCommandHandler.ts index aeea101..09baf2e 100644 --- a/src/lib/extensions/BushCommandHandler.ts +++ b/src/lib/extensions/discord-akairo/BushCommandHandler.ts @@ -1,10 +1,10 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Category, CommandHandler, CommandHandlerOptions } from 'discord-akairo'; import { Collection } from 'discord.js'; -import { BushConstants } from '../utils/BushConstants'; +import { BushConstants } from '../../utils/BushConstants'; +import { BushMessage } from '../discord.js/BushMessage'; import { BushClient } from './BushClient'; import { BushCommand } from './BushCommand'; -import { BushMessage } from './BushMessage'; export type BushCommandHandlerOptions = CommandHandlerOptions; @@ -17,7 +17,6 @@ export class BushCommandHandler extends CommandHandler { public declare categories: Collection<string, Category<string, BushCommand>>; public constructor(client: BushClient, options: CommandHandlerOptions) { super(client, options); - this.client = client; } public async runPostTypeInhibitors(message: BushMessage, command: BushCommand, slash = false): Promise<boolean> { diff --git a/src/lib/extensions/BushCommandUtil.ts b/src/lib/extensions/discord-akairo/BushCommandUtil.ts index b4084bd..b4084bd 100644 --- a/src/lib/extensions/BushCommandUtil.ts +++ b/src/lib/extensions/discord-akairo/BushCommandUtil.ts diff --git a/src/lib/extensions/BushInhibitor.ts b/src/lib/extensions/discord-akairo/BushInhibitor.ts index 602ff65..ae91494 100644 --- a/src/lib/extensions/BushInhibitor.ts +++ b/src/lib/extensions/discord-akairo/BushInhibitor.ts @@ -1,8 +1,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Inhibitor } from 'discord-akairo'; +import { BushMessage } from '../discord.js/BushMessage'; import { BushClient } from './BushClient'; import { BushCommand } from './BushCommand'; -import { BushMessage } from './BushMessage'; import { BushSlashMessage } from './BushSlashMessage'; export class BushInhibitor extends Inhibitor { diff --git a/src/lib/extensions/BushInhinitorHandler.ts b/src/lib/extensions/discord-akairo/BushInhinitorHandler.ts index 2a947da..2a947da 100644 --- a/src/lib/extensions/BushInhinitorHandler.ts +++ b/src/lib/extensions/discord-akairo/BushInhinitorHandler.ts diff --git a/src/lib/extensions/BushListener.ts b/src/lib/extensions/discord-akairo/BushListener.ts index e555e89..e555e89 100644 --- a/src/lib/extensions/BushListener.ts +++ b/src/lib/extensions/discord-akairo/BushListener.ts diff --git a/src/lib/extensions/BushListenerHandler.ts b/src/lib/extensions/discord-akairo/BushListenerHandler.ts index 28615fc..28615fc 100644 --- a/src/lib/extensions/BushListenerHandler.ts +++ b/src/lib/extensions/discord-akairo/BushListenerHandler.ts diff --git a/src/lib/extensions/BushSlashMessage.ts b/src/lib/extensions/discord-akairo/BushSlashMessage.ts index 33ca11f..9e9f994 100644 --- a/src/lib/extensions/BushSlashMessage.ts +++ b/src/lib/extensions/discord-akairo/BushSlashMessage.ts @@ -1,9 +1,9 @@ import { AkairoMessage } from 'discord-akairo'; import { CommandInteraction } from 'discord.js'; +import { BushGuild } from '../discord.js/BushGuild'; +import { BushUser } from '../discord.js/BushUser'; import { BushClient } from './BushClient'; import { BushCommandUtil } from './BushCommandUtil'; -import { BushGuild } from './BushGuild'; -import { BushUser } from './BushUser'; export class BushSlashMessage extends AkairoMessage { public declare client: BushClient; diff --git a/src/lib/extensions/BushTask.ts b/src/lib/extensions/discord-akairo/BushTask.ts index 06d0602..06d0602 100644 --- a/src/lib/extensions/BushTask.ts +++ b/src/lib/extensions/discord-akairo/BushTask.ts diff --git a/src/lib/extensions/BushTaskHandler.ts b/src/lib/extensions/discord-akairo/BushTaskHandler.ts index 588988d..588988d 100644 --- a/src/lib/extensions/BushTaskHandler.ts +++ b/src/lib/extensions/discord-akairo/BushTaskHandler.ts diff --git a/src/lib/extensions/discord.js/BushCategoryChannel.ts b/src/lib/extensions/discord.js/BushCategoryChannel.ts new file mode 100644 index 0000000..c4bc3ca --- /dev/null +++ b/src/lib/extensions/discord.js/BushCategoryChannel.ts @@ -0,0 +1,16 @@ +import { CategoryChannel, Collection, Snowflake } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushGuildChannel } from './BushGuildChannel'; +import { BushGuildMember } from './BushGuildMember'; + +export class BushCategoryChannel extends CategoryChannel { + public declare readonly client: BushClient; + public declare readonly children: Collection<Snowflake, BushGuildChannel>; + public declare guild: BushGuild; + public declare readonly members: Collection<Snowflake, BushGuildMember>; + public declare readonly parent: CategoryChannel | null; + constructor(guild: BushGuild, data?: unknown) { + super(guild, data); + } +} diff --git a/src/lib/extensions/discord.js/BushDMChannel.ts b/src/lib/extensions/discord.js/BushDMChannel.ts new file mode 100644 index 0000000..475f224 --- /dev/null +++ b/src/lib/extensions/discord.js/BushDMChannel.ts @@ -0,0 +1,14 @@ +import { DMChannel } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushMessageManager } from './BushMessageManager'; +import { BushUser } from './BushUser'; + +export class BushDMChannel extends DMChannel { + public declare readonly client: BushClient; + public declare messages: BushMessageManager; + public declare recipient: BushUser; + + constructor(client: BushClient, data?: unknown) { + super(client, data); + } +} diff --git a/src/lib/extensions/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts index 1d7b3c8..95e07f9 100644 --- a/src/lib/extensions/BushGuild.ts +++ b/src/lib/extensions/discord.js/BushGuild.ts @@ -1,9 +1,9 @@ -import { Guild, Structures } from 'discord.js'; -import { Guild as GuildDB, GuildModel } from '../models/Guild'; -import { BushClient } from './BushClient'; +import { Guild } from 'discord.js'; +import { Guild as GuildDB, GuildModel } from '../../models/Guild'; +import { BushClient } from '../discord-akairo/BushClient'; export class BushGuild extends Guild { - public declare client: BushClient; + public declare readonly client: BushClient; public constructor(client: BushClient, data: unknown) { super(client, data); } @@ -18,5 +18,3 @@ export class BushGuild extends Guild { return await row.save(); } } - -Structures.extend('Guild', () => BushGuild); diff --git a/src/lib/extensions/discord.js/BushGuildChannel.ts b/src/lib/extensions/discord.js/BushGuildChannel.ts new file mode 100644 index 0000000..75b8a5f --- /dev/null +++ b/src/lib/extensions/discord.js/BushGuildChannel.ts @@ -0,0 +1,11 @@ +import { GuildChannel } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; + +export class BushGuildChannel extends GuildChannel { + public declare readonly client: BushClient; + public declare guild: BushGuild; + constructor(guild: BushGuild, data?: unknown) { + super(guild, data); + } +} diff --git a/src/lib/extensions/discord.js/BushGuildEmoji.ts b/src/lib/extensions/discord.js/BushGuildEmoji.ts new file mode 100644 index 0000000..8c97ada --- /dev/null +++ b/src/lib/extensions/discord.js/BushGuildEmoji.ts @@ -0,0 +1,15 @@ +import { GuildEmoji } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushGuildEmojiRoleManager } from './BushGuildEmojiRoleManager'; +import { BushUser } from './BushUser'; + +export class BushGuildEmoji extends GuildEmoji { + public declare readonly client: BushClient; + public declare guild: BushGuild; + public declare author: BushUser | null; + public declare readonly roles: BushGuildEmojiRoleManager; + constructor(client: BushClient, data: unknown, guild: BushGuild) { + super(client, data, guild); + } +} diff --git a/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts b/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts new file mode 100644 index 0000000..86c2492 --- /dev/null +++ b/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts @@ -0,0 +1,13 @@ +import { Collection, GuildEmojiRoleManager, Snowflake } from 'discord.js'; +import { BushGuild } from './BushGuild'; +import { BushGuildEmoji } from './BushGuildEmoji'; +import { BushRole } from './BushRole'; + +export class BushGuildEmojiRoleManager extends GuildEmojiRoleManager { + public declare emoji: BushGuildEmoji; + public declare guild: BushGuild; + public declare cache: Collection<Snowflake, BushRole>; + constructor(emoji: BushGuildEmoji) { + super(emoji); + } +} diff --git a/src/lib/extensions/BushGuildMember.ts b/src/lib/extensions/discord.js/BushGuildMember.ts index 2bb0601..6bcb9b8 100644 --- a/src/lib/extensions/BushGuildMember.ts +++ b/src/lib/extensions/discord.js/BushGuildMember.ts @@ -1,15 +1,13 @@ -import { GuildMember, Structures } from 'discord.js'; -import { BushClient } from './BushClient'; +import { GuildMember } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; import { BushGuild } from './BushGuild'; import { BushUser } from './BushUser'; export class BushGuildMember extends GuildMember { - public declare client: BushClient; + public declare readonly client: BushClient; public declare guild: BushGuild; public declare BushUser: BushUser; public constructor(client: BushClient, data: unknown, guild: BushGuild) { super(client, data, guild); } } - -Structures.extend('GuildMember', () => BushGuildMember); diff --git a/src/lib/extensions/discord.js/BushMessage.ts b/src/lib/extensions/discord.js/BushMessage.ts new file mode 100644 index 0000000..e4380f7 --- /dev/null +++ b/src/lib/extensions/discord.js/BushMessage.ts @@ -0,0 +1,26 @@ +import { Message } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushCommandUtil } from '../discord-akairo/BushCommandUtil'; +import { BushDMChannel } from './BushDMChannel'; +import { BushGuild } from './BushGuild'; +import { BushGuildMember } from './BushGuildMember'; +import { BushNewsChannel } from './BushNewsChannel'; +import { BushTextChannel } from './BushTextChannel'; +import { BushThreadChannel } from './BushThreadChannel'; +import { BushUser } from './BushUser'; + +export class BushMessage extends Message { + public declare readonly client: BushClient; + public declare util: BushCommandUtil; + public declare readonly guild: BushGuild; + public declare readonly member: BushGuildMember; + public declare author: BushUser; + public declare channel: BushTextChannel | BushDMChannel | BushNewsChannel | BushThreadChannel; + public constructor( + client: BushClient, + data: unknown, + channel: BushTextChannel | BushDMChannel | BushNewsChannel | BushThreadChannel + ) { + super(client, data, channel); + } +} diff --git a/src/lib/extensions/discord.js/BushMessageManager.ts b/src/lib/extensions/discord.js/BushMessageManager.ts new file mode 100644 index 0000000..c9256a9 --- /dev/null +++ b/src/lib/extensions/discord.js/BushMessageManager.ts @@ -0,0 +1,14 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { Collection, MessageManager, Snowflake } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushDMChannel } from './BushDMChannel'; +import { BushMessage } from './BushMessage'; +import { BushTextChannel } from './BushTextChannel'; + +export class BushMessageManager extends MessageManager { + public declare readonly client: BushClient; + public declare cache: Collection<Snowflake, BushMessage>; + constructor(channel: BushTextChannel | BushDMChannel, iterable?: Iterable<any>) { + super(channel, iterable); + } +} diff --git a/src/lib/extensions/discord.js/BushNewsChannel.ts b/src/lib/extensions/discord.js/BushNewsChannel.ts new file mode 100644 index 0000000..77b7a9d --- /dev/null +++ b/src/lib/extensions/discord.js/BushNewsChannel.ts @@ -0,0 +1,16 @@ +import { NewsChannel } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushMessageManager } from './BushMessageManager'; +import { BushThreadManager } from './BushThreadManager'; + +export class BushNewsChannel extends NewsChannel { + public declare readonly client: BushClient; + public declare guild: BushGuild; + public declare messages: BushMessageManager; + public declare threads: BushThreadManager; + // eslint-disable-next-line @typescript-eslint/ban-types + constructor(guild: BushGuild, data?: object) { + super(guild, data); + } +} diff --git a/src/lib/extensions/discord.js/BushRole.ts b/src/lib/extensions/discord.js/BushRole.ts new file mode 100644 index 0000000..ce8e9dc --- /dev/null +++ b/src/lib/extensions/discord.js/BushRole.ts @@ -0,0 +1,13 @@ +import { Collection, Role, Snowflake } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushGuildMember } from './BushGuildMember'; + +export class BushRole extends Role { + public declare readonly client: BushClient; + public guild: BushGuild; + public readonly members: Collection<Snowflake, BushGuildMember>; + constructor(client: BushClient, data: unknown, guild: BushGuild) { + super(client, data, guild); + } +} diff --git a/src/lib/extensions/discord.js/BushStoreChannel.ts b/src/lib/extensions/discord.js/BushStoreChannel.ts new file mode 100644 index 0000000..1a9b855 --- /dev/null +++ b/src/lib/extensions/discord.js/BushStoreChannel.ts @@ -0,0 +1,16 @@ +import { Collection, Snowflake, StoreChannel } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushCategoryChannel } from './BushCategoryChannel'; +import { BushGuild } from './BushGuild'; +import { BushGuildMember } from './BushGuildMember'; + +export class BushStoreChannel extends StoreChannel { + public declare readonly client: BushClient; + public declare guild: BushGuild; + public declare readonly members: Collection<Snowflake, BushGuildMember>; + public declare readonly parent: BushCategoryChannel | null; + + constructor(guild: BushGuild, data?: unknown) { + super(guild, data); + } +} diff --git a/src/lib/extensions/discord.js/BushTextChannel.ts b/src/lib/extensions/discord.js/BushTextChannel.ts new file mode 100644 index 0000000..b58aa7b --- /dev/null +++ b/src/lib/extensions/discord.js/BushTextChannel.ts @@ -0,0 +1,13 @@ +import { TextChannel } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushMessageManager } from './BushMessageManager'; + +export class BushTextChannel extends TextChannel { + public declare readonly client: BushClient; + public declare guild: BushGuild; + public declare messages: BushMessageManager; + constructor(guild: BushGuild, data?: unknown) { + super(guild, data); + } +} diff --git a/src/lib/extensions/discord.js/BushThreadChannel.ts b/src/lib/extensions/discord.js/BushThreadChannel.ts new file mode 100644 index 0000000..10fc65e --- /dev/null +++ b/src/lib/extensions/discord.js/BushThreadChannel.ts @@ -0,0 +1,23 @@ +/* eslint-disable @typescript-eslint/ban-types */ +import { Collection, Snowflake, ThreadChannel } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushGuildMember } from './BushGuildMember'; +import { BushMessageManager } from './BushMessageManager'; +import { BushNewsChannel } from './BushNewsChannel'; +import { BushTextChannel } from './BushTextChannel'; +import { BushThreadMemberManager } from './BushThreadMemberManager'; + +export class BushThreadChannel extends ThreadChannel { + public declare guild: BushGuild; + public declare messages: BushMessageManager; + public declare members: BushThreadMemberManager; + + public declare readonly client: BushClient; + public declare readonly guildMembers: Collection<Snowflake, BushGuildMember>; + + public declare readonly parent: BushTextChannel | BushNewsChannel | null; + constructor(guild: BushGuild, data?: object) { + super(guild, data); + } +} diff --git a/src/lib/extensions/discord.js/BushThreadManager.ts b/src/lib/extensions/discord.js/BushThreadManager.ts new file mode 100644 index 0000000..408ac7f --- /dev/null +++ b/src/lib/extensions/discord.js/BushThreadManager.ts @@ -0,0 +1,11 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { ThreadManager } from 'discord.js'; +import { BushNewsChannel } from './BushNewsChannel'; +import { BushTextChannel } from './BushTextChannel'; + +export class BushThreadManager extends ThreadManager { + public declare channel: BushTextChannel | BushNewsChannel; + constructor(channel: BushTextChannel | BushNewsChannel, iterable?: Iterable<any>) { + super(channel, iterable); + } +} diff --git a/src/lib/extensions/discord.js/BushThreadMember.ts b/src/lib/extensions/discord.js/BushThreadMember.ts new file mode 100644 index 0000000..16da663 --- /dev/null +++ b/src/lib/extensions/discord.js/BushThreadMember.ts @@ -0,0 +1,14 @@ +/* eslint-disable @typescript-eslint/ban-types */ +import { ThreadMember } from 'discord.js'; +import { BushGuildMember } from './BushGuildMember'; +import { BushThreadChannel } from './BushThreadChannel'; +import { BushUser } from './BushUser'; + +export class BushThreadMember extends ThreadMember { + public declare readonly guildMember: BushGuildMember | null; + public declare readonly user: BushUser | null; + public declare thread: BushThreadChannel; + constructor(thread: BushThreadChannel, data?: object) { + super(thread, data); + } +} diff --git a/src/lib/extensions/discord.js/BushThreadMemberManager.ts b/src/lib/extensions/discord.js/BushThreadMemberManager.ts new file mode 100644 index 0000000..7c7bb6d --- /dev/null +++ b/src/lib/extensions/discord.js/BushThreadMemberManager.ts @@ -0,0 +1,23 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +import { Snowflake, ThreadMemberManager, UserResolvable } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushGuildMember } from './BushGuildMember'; +import { BushMessage } from './BushMessage'; +import { BushThreadChannel } from './BushThreadChannel'; +import { BushThreadMember } from './BushThreadMember'; +import { BushUser } from './BushUser'; + +export type BushThreadMemberResolvable = BushThreadMember | UserResolvable; +export type BushUserResolvable = BushUser | Snowflake | BushMessage | BushGuildMember | BushThreadMember; + +export interface BushThreadMemberManager extends ThreadMemberManager {} + +export class BushThreadMemberManager extends ThreadMemberManager { + public declare thread: BushThreadChannel; + public declare readonly client: BushClient; + + constructor(thread: BushThreadChannel, iterable?: Iterable<any>) { + super(thread, iterable); + } +} diff --git a/src/lib/extensions/BushUser.ts b/src/lib/extensions/discord.js/BushUser.ts index 53fd449..53a6be3 100644 --- a/src/lib/extensions/BushUser.ts +++ b/src/lib/extensions/discord.js/BushUser.ts @@ -1,8 +1,10 @@ -import { Structures, User } from 'discord.js'; -import { BushClient } from './BushClient'; +import { User } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushDMChannel } from './BushDMChannel'; export class BushUser extends User { - public declare client: BushClient; + public declare readonly client: BushClient; + public declare readonly dmChannel: BushDMChannel | null; public constructor(client: BushClient, data: unknown) { super(client, data); } @@ -15,5 +17,3 @@ export class BushUser extends User { return this.client.isSuperUser(this); } } - -Structures.extend('User', () => BushUser); diff --git a/src/lib/extensions/discord.js/BushVoiceChannel.ts b/src/lib/extensions/discord.js/BushVoiceChannel.ts new file mode 100644 index 0000000..7510b69 --- /dev/null +++ b/src/lib/extensions/discord.js/BushVoiceChannel.ts @@ -0,0 +1,12 @@ +import { Collection, Snowflake, VoiceChannel } from 'discord.js'; +import { BushClient } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushGuildMember } from './BushGuildMember'; + +export class BushVoiceChannel extends VoiceChannel { + public declare readonly client: BushClient; + public declare readonly members: Collection<Snowflake, BushGuildMember>; + constructor(guild: BushGuild, data?: unknown) { + super(guild, data); + } +} diff --git a/src/lib/models/Guild.ts b/src/lib/models/Guild.ts index 480cc60..303335b 100644 --- a/src/lib/models/Guild.ts +++ b/src/lib/models/Guild.ts @@ -1,6 +1,6 @@ import { Snowflake } from 'discord.js'; import { DataTypes, Optional, Sequelize } from 'sequelize'; -import { BushClient } from '../extensions/BushClient'; +import { BushClient } from '../extensions/discord-akairo/BushClient'; import { BaseModel } from './BaseModel'; export interface GuildModel { diff --git a/src/lib/utils/BushLogger.ts b/src/lib/utils/BushLogger.ts index f14a05b..7293c41 100644 --- a/src/lib/utils/BushLogger.ts +++ b/src/lib/utils/BushLogger.ts @@ -3,7 +3,7 @@ import chalk from 'chalk'; import { MessageEmbed } from 'discord.js'; import { inspect } from 'util'; -import { BushClient, BushSendMessageType } from '../extensions/BushClient'; +import { BushClient, BushSendMessageType } from '../extensions/discord-akairo/BushClient'; export class BushLogger { private client: BushClient; diff --git a/src/listeners/client/ready.ts b/src/listeners/client/ready.ts index 1a51527..c739152 100644 --- a/src/listeners/client/ready.ts +++ b/src/listeners/client/ready.ts @@ -1,5 +1,5 @@ import chalk from 'chalk'; -import { BushListener } from '../../lib/extensions/BushListener'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; export default class ReadyListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/commandBlocked.ts b/src/listeners/commands/commandBlocked.ts index 816005d..342e025 100644 --- a/src/listeners/commands/commandBlocked.ts +++ b/src/listeners/commands/commandBlocked.ts @@ -1,6 +1,6 @@ -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushListener } from '../../lib/extensions/BushListener'; -import { BushMessage } from '../../lib/extensions/BushMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class CommandBlockedListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index 85ff11f..3cb5046 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -1,8 +1,8 @@ import { stripIndents } from 'common-tags'; import { Command } from 'discord-akairo'; import { MessageEmbed } from 'discord.js'; -import { BushListener } from '../../lib/extensions/BushListener'; -import { BushMessage } from '../../lib/extensions/BushMessage'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class CommandErrorListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/commandMissingPermissions.ts b/src/listeners/commands/commandMissingPermissions.ts index d695d25..e3420ae 100644 --- a/src/listeners/commands/commandMissingPermissions.ts +++ b/src/listeners/commands/commandMissingPermissions.ts @@ -1,6 +1,6 @@ -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushListener } from '../../lib/extensions/BushListener'; -import { BushMessage } from '../../lib/extensions/BushMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; +import { BushMessage } from '../../lib/extensions/discord.js/BushMessage'; export default class CommandMissingPermissionsListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/commandStarted.ts b/src/listeners/commands/commandStarted.ts index 9266fc7..6cfd239 100644 --- a/src/listeners/commands/commandStarted.ts +++ b/src/listeners/commands/commandStarted.ts @@ -1,6 +1,6 @@ import { Message } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushListener } from '../../lib/extensions/BushListener'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; export default class CommandStartedListener extends BushListener { constructor() { diff --git a/src/listeners/commands/slashBlocked.ts b/src/listeners/commands/slashBlocked.ts index 761bef8..04180f7 100644 --- a/src/listeners/commands/slashBlocked.ts +++ b/src/listeners/commands/slashBlocked.ts @@ -1,6 +1,6 @@ -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushListener } from '../../lib/extensions/BushListener'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; export default class SlashBlockedListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/slashCommandError.ts b/src/listeners/commands/slashCommandError.ts index da00eb4..ea48f34 100644 --- a/src/listeners/commands/slashCommandError.ts +++ b/src/listeners/commands/slashCommandError.ts @@ -1,8 +1,8 @@ import { stripIndents } from 'common-tags'; import { MessageEmbed } from 'discord.js'; -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushListener } from '../../lib/extensions/BushListener'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; export default class SlashCommandErrorListener extends BushListener { constructor() { diff --git a/src/listeners/commands/slashMissingPermissions.ts b/src/listeners/commands/slashMissingPermissions.ts index 1f3599f..d8f32cf 100644 --- a/src/listeners/commands/slashMissingPermissions.ts +++ b/src/listeners/commands/slashMissingPermissions.ts @@ -1,6 +1,6 @@ import { Command } from 'discord-akairo'; import { CommandInteraction } from 'discord.js'; -import { BushListener } from '../../lib/extensions/BushListener'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; export default class SlashMissingPermissionsListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/slashStarted.ts b/src/listeners/commands/slashStarted.ts index 534d89d..028d962 100644 --- a/src/listeners/commands/slashStarted.ts +++ b/src/listeners/commands/slashStarted.ts @@ -1,6 +1,6 @@ -import { BushCommand } from '../../lib/extensions/BushCommand'; -import { BushListener } from '../../lib/extensions/BushListener'; -import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage'; +import { BushCommand } from '../../lib/extensions/discord-akairo/BushCommand'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; +import { BushSlashMessage } from '../../lib/extensions/discord-akairo/BushSlashMessage'; export default class SlashStartedListener extends BushListener { constructor() { diff --git a/src/listeners/guild/syncUnban.ts b/src/listeners/guild/syncUnban.ts index 81a08f8..25529ea 100644 --- a/src/listeners/guild/syncUnban.ts +++ b/src/listeners/guild/syncUnban.ts @@ -1,5 +1,5 @@ -import { User, Guild } from 'discord.js'; -import { BushListener } from '../../lib/extensions/BushListener'; +import { Guild, User } from 'discord.js'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; import { Ban } from '../../lib/models'; export default class SyncUnbanListener extends BushListener { diff --git a/src/listeners/message/level.ts b/src/listeners/message/level.ts index 9f413e5..ea6a491 100644 --- a/src/listeners/message/level.ts +++ b/src/listeners/message/level.ts @@ -1,5 +1,5 @@ import { Message } from 'discord.js'; -import { BushListener } from '../../lib/extensions/BushListener'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; import { Level } from '../../lib/models'; export default class LevelListener extends BushListener { diff --git a/src/listeners/other/consoleListener.ts b/src/listeners/other/consoleListener.ts index d1e318f..98f44e2 100644 --- a/src/listeners/other/consoleListener.ts +++ b/src/listeners/other/consoleListener.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { BushListener } from '../../lib/extensions/BushListener'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; export default class ConsoleListener extends BushListener { public constructor() { diff --git a/src/listeners/other/promiseRejection.ts b/src/listeners/other/promiseRejection.ts index 143659a..2fcfdc9 100644 --- a/src/listeners/other/promiseRejection.ts +++ b/src/listeners/other/promiseRejection.ts @@ -1,4 +1,4 @@ -import { BushListener } from '../../lib/extensions/BushListener'; +import { BushListener } from '../../lib/extensions/discord-akairo/BushListener'; export default class PromiseRejectionListener extends BushListener { constructor() { diff --git a/src/tasks/unban.ts b/src/tasks/unban.ts index 6e06db8..b6d96b8 100644 --- a/src/tasks/unban.ts +++ b/src/tasks/unban.ts @@ -1,6 +1,6 @@ import { DiscordAPIError } from 'discord.js'; import { Op } from 'sequelize'; -import { BushTask } from '../lib/extensions/BushTask'; +import { BushTask } from '../lib/extensions/discord-akairo/BushTask'; import { Ban } from '../lib/models'; export default class UnbanTask extends BushTask { diff --git a/src/tasks/unmute.ts b/src/tasks/unmute.ts index 2dfa2ab..6513345 100644 --- a/src/tasks/unmute.ts +++ b/src/tasks/unmute.ts @@ -1,6 +1,6 @@ import { DiscordAPIError } from 'discord.js'; import { Op } from 'sequelize'; -import { BushTask } from '../lib/extensions/BushTask'; +import { BushTask } from '../lib/extensions/discord-akairo/BushTask'; import { Guild } from '../lib/models'; import { Mute } from '../lib/models/Mute'; diff --git a/src/tasks/updateCache.ts b/src/tasks/updateCache.ts index 3f213f2..2f1d2d1 100644 --- a/src/tasks/updateCache.ts +++ b/src/tasks/updateCache.ts @@ -1,5 +1,5 @@ -import { BushClient } from '../lib/extensions/BushClient'; -import { BushTask } from '../lib/extensions/BushTask'; +import { BushClient } from '../lib/extensions/discord-akairo/BushClient'; +import { BushTask } from '../lib/extensions/discord-akairo/BushTask'; import { Global } from '../lib/models'; import * as config from './../config/options'; |