From 14eb0e617b084080c4cffc5b781b311c65c5f928 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 28 Aug 2022 21:51:17 -0400 Subject: rebrand v3 --- src/bot.ts | 8 +- src/commands/_fake-command/ironmoon.ts | 4 +- src/commands/admin/channelPermissions.ts | 4 +- src/commands/admin/roleAll.ts | 4 +- src/commands/config/blacklist.ts | 4 +- src/commands/config/config.ts | 4 +- src/commands/config/disable.ts | 6 +- src/commands/config/features.ts | 4 +- src/commands/config/log.ts | 4 +- src/commands/dev/__template.ts | 4 +- src/commands/dev/dm.ts | 4 +- src/commands/dev/eval.ts | 10 +- src/commands/dev/javascript.ts | 4 +- src/commands/dev/reload.ts | 4 +- src/commands/dev/say.ts | 4 +- src/commands/dev/servers.ts | 4 +- src/commands/dev/sh.ts | 4 +- src/commands/dev/superUser.ts | 4 +- src/commands/dev/syncAutomod.ts | 4 +- src/commands/dev/test.ts | 4 +- src/commands/fun/coinFlip.ts | 4 +- src/commands/fun/dice.ts | 4 +- src/commands/fun/eightBall.ts | 4 +- src/commands/fun/minesweeper.ts | 4 +- src/commands/info/avatar.ts | 4 +- src/commands/info/botInfo.ts | 4 +- src/commands/info/color.ts | 4 +- src/commands/info/guildInfo.ts | 16 +-- src/commands/info/help.ts | 16 +-- src/commands/info/icon.ts | 4 +- src/commands/info/inviteInfo.ts | 4 +- src/commands/info/links.ts | 4 +- src/commands/info/ping.ts | 4 +- src/commands/info/pronouns.ts | 4 +- src/commands/info/snowflake.ts | 8 +- src/commands/info/userInfo.ts | 4 +- src/commands/leveling/leaderboard.ts | 4 +- src/commands/leveling/level.ts | 4 +- src/commands/leveling/levelRoles.ts | 4 +- src/commands/leveling/setLevel.ts | 4 +- src/commands/leveling/setXp.ts | 4 +- src/commands/moderation/_activePunishments.ts | 4 +- src/commands/moderation/ban.ts | 6 +- src/commands/moderation/block.ts | 6 +- src/commands/moderation/evidence.ts | 7 +- src/commands/moderation/hideCase.ts | 7 +- src/commands/moderation/kick.ts | 6 +- src/commands/moderation/lockdown.ts | 4 +- src/commands/moderation/massBan.ts | 13 ++- src/commands/moderation/massEvidence.ts | 7 +- src/commands/moderation/modlog.ts | 4 +- src/commands/moderation/mute.ts | 6 +- src/commands/moderation/myLogs.ts | 4 +- src/commands/moderation/purge.ts | 7 +- src/commands/moderation/removeReactionEmoji.ts | 4 +- src/commands/moderation/role.ts | 6 +- src/commands/moderation/slowmode.ts | 4 +- src/commands/moderation/timeout.ts | 6 +- src/commands/moderation/unban.ts | 6 +- src/commands/moderation/unblock.ts | 6 +- src/commands/moderation/unlockdown.ts | 4 +- src/commands/moderation/unmute.ts | 6 +- src/commands/moderation/untimeout.ts | 6 +- src/commands/moderation/warn.ts | 6 +- src/commands/moulberry-bush/capePermissions.ts | 4 +- src/commands/moulberry-bush/capes.ts | 4 +- src/commands/moulberry-bush/giveawayPing.ts | 4 +- src/commands/moulberry-bush/moulHammer.ts | 12 +-- src/commands/moulberry-bush/neuRepo.ts | 4 +- src/commands/moulberry-bush/report.ts | 4 +- src/commands/moulberry-bush/rule.ts | 4 +- src/commands/moulberry-bush/serverStatus.ts | 4 +- src/commands/moulberry-bush/solved.ts | 4 +- src/commands/tickets/ticket-!.ts | 4 +- src/commands/utilities/_poll.ts | 4 +- src/commands/utilities/activity.ts | 8 +- src/commands/utilities/calculator.ts | 4 +- src/commands/utilities/decode.ts | 4 +- src/commands/utilities/hash.ts | 4 +- src/commands/utilities/highlight-!.ts | 4 +- src/commands/utilities/highlight-add.ts | 4 +- src/commands/utilities/highlight-block.ts | 4 +- src/commands/utilities/highlight-clear.ts | 4 +- src/commands/utilities/highlight-matches.ts | 4 +- src/commands/utilities/highlight-remove.ts | 4 +- src/commands/utilities/highlight-show.ts | 4 +- src/commands/utilities/highlight-unblock.ts | 4 +- src/commands/utilities/price.ts | 4 +- src/commands/utilities/remind.ts | 4 +- src/commands/utilities/reminders.ts | 4 +- src/commands/utilities/steal.ts | 4 +- src/commands/utilities/suicide.ts | 4 +- src/commands/utilities/uuid.ts | 4 +- src/commands/utilities/viewRaw.ts | 4 +- src/commands/utilities/whoHasRole.ts | 4 +- src/commands/utilities/wolframAlpha.ts | 4 +- src/inhibitors/blacklist/channelGlobalBlacklist.ts | 7 +- src/inhibitors/blacklist/channelGuildBlacklist.ts | 7 +- src/inhibitors/blacklist/guildBlacklist.ts | 5 +- src/inhibitors/blacklist/userGlobalBlacklist.ts | 5 +- src/inhibitors/blacklist/userGuildBlacklist.ts | 5 +- src/inhibitors/checks/fatal.ts | 5 +- src/inhibitors/checks/guildUnavailable.ts | 5 +- src/inhibitors/command/dm.ts | 7 +- src/inhibitors/command/globalDisabledCommand.ts | 7 +- src/inhibitors/command/guild.ts | 7 +- src/inhibitors/command/guildDisabledCommand.ts | 7 +- src/inhibitors/command/nsfw.ts | 7 +- src/inhibitors/command/owner.ts | 7 +- src/inhibitors/command/restrictedChannel.ts | 7 +- src/inhibitors/command/restrictedGuild.ts | 7 +- src/inhibitors/command/superUser.ts | 7 +- src/listeners/automod/automodCreate.ts | 9 +- src/listeners/automod/automodUpdate.ts | 9 +- src/listeners/automod/memberAutomod.ts | 6 +- src/listeners/automod/presenceAutomod.ts | 6 +- src/listeners/bush/appealListener.ts | 9 +- src/listeners/bush/joinAutoBan.ts | 11 +- src/listeners/bush/supportThread.ts | 9 +- src/listeners/bush/userUpdateAutoBan.ts | 11 +- src/listeners/client/akairoDebug.ts | 9 +- src/listeners/client/dcjsDebug.ts | 15 --- src/listeners/client/dcjsError.ts | 15 --- src/listeners/client/dcjsWarn.ts | 15 --- src/listeners/client/djsDebug.ts | 14 +++ src/listeners/client/djsError.ts | 14 +++ src/listeners/client/djsWarn.ts | 14 +++ src/listeners/client/ready.ts | 6 +- src/listeners/commands/commandBlocked.ts | 15 ++- src/listeners/commands/commandCooldown.ts | 9 +- src/listeners/commands/commandError.ts | 9 +- src/listeners/commands/commandLocked.ts | 9 +- .../commands/commandMissingPermissions.ts | 13 ++- src/listeners/commands/commandStarted.ts | 9 +- src/listeners/commands/messageBlocked.ts | 9 +- src/listeners/commands/slashBlocked.ts | 9 +- src/listeners/commands/slashCommandError.ts | 9 +- src/listeners/commands/slashMissingPermissions.ts | 9 +- src/listeners/commands/slashNotFound.ts | 9 +- src/listeners/commands/slashStarted.ts | 9 +- .../contextCommands/contextCommandBlocked.ts | 7 +- .../contextCommands/contextCommandError.ts | 7 +- .../contextCommands/contextCommandNotFound.ts | 7 +- .../contextCommands/contextCommandStarted.ts | 7 +- src/listeners/guild-custom/bushLockdown.ts | 33 ------ src/listeners/guild-custom/bushUnlockdown.ts | 33 ------ src/listeners/guild-custom/lockdown.ts | 32 ++++++ src/listeners/guild-custom/unlockdown.ts | 32 ++++++ src/listeners/guild/guildCreate.ts | 9 +- src/listeners/guild/guildDelete.ts | 9 +- src/listeners/guild/guildMemberAdd.ts | 9 +- src/listeners/guild/guildMemberRemove.ts | 9 +- src/listeners/guild/joinRoles.ts | 9 +- src/listeners/guild/syncUnbanPunishmentModel.ts | 9 +- src/listeners/interaction/interactionCreate.ts | 9 +- src/listeners/member-custom/bushBan.ts | 33 ------ src/listeners/member-custom/bushBlock.ts | 35 ------- src/listeners/member-custom/bushKick.ts | 32 ------ src/listeners/member-custom/bushLevelUpdate.ts | 64 ------------ src/listeners/member-custom/bushMute.ts | 33 ------ src/listeners/member-custom/bushPunishRole.ts | 32 ------ .../member-custom/bushPunishRoleRemove.ts | 33 ------ src/listeners/member-custom/bushPurge.ts | 44 -------- src/listeners/member-custom/bushRemoveTimeout.ts | 32 ------ src/listeners/member-custom/bushTimeout.ts | 33 ------ src/listeners/member-custom/bushUnban.ts | 32 ------ src/listeners/member-custom/bushUnblock.ts | 33 ------ src/listeners/member-custom/bushUnmute.ts | 32 ------ src/listeners/member-custom/bushUpdateModlog.ts | 41 -------- src/listeners/member-custom/bushUpdateSettings.ts | 34 ------ src/listeners/member-custom/bushWarn.ts | 32 ------ src/listeners/member-custom/customBan.ts | 32 ++++++ src/listeners/member-custom/customBlock.ts | 36 +++++++ src/listeners/member-custom/customKick.ts | 31 ++++++ src/listeners/member-custom/customMute.ts | 32 ++++++ src/listeners/member-custom/customPurge.ts | 43 ++++++++ src/listeners/member-custom/customRemoveTimeout.ts | 31 ++++++ src/listeners/member-custom/customTimeout.ts | 32 ++++++ src/listeners/member-custom/customUnban.ts | 31 ++++++ src/listeners/member-custom/customUnblock.ts | 32 ++++++ src/listeners/member-custom/customUnmute.ts | 31 ++++++ src/listeners/member-custom/customWarnMember.ts | 31 ++++++ src/listeners/member-custom/levelUpdate.ts | 63 +++++++++++ src/listeners/member-custom/massBan.ts | 11 +- src/listeners/member-custom/massEvidence.ts | 11 +- src/listeners/member-custom/punishRole.ts | 31 ++++++ src/listeners/member-custom/punishRoleRemove.ts | 32 ++++++ src/listeners/member-custom/updateModlog.ts | 40 +++++++ src/listeners/member-custom/updateSettings.ts | 33 ++++++ src/listeners/message/autoPublisher.ts | 9 +- src/listeners/message/blacklistedFile.ts | 7 +- src/listeners/message/boosterMessage.ts | 9 +- src/listeners/message/directMessage.ts | 9 +- src/listeners/message/highlight.ts | 9 +- src/listeners/message/level.ts | 11 +- src/listeners/message/quoteCreate.ts | 9 +- src/listeners/message/quoteEdit.ts | 7 +- src/listeners/message/verbose.ts | 9 +- src/listeners/other/consoleListener.ts | 116 ++++++++++----------- src/listeners/other/exit.ts | 4 +- src/listeners/other/promiseRejection.ts | 4 +- src/listeners/other/uncaughtException.ts | 4 +- src/listeners/other/warning.ts | 4 +- src/listeners/rest/rateLimit.ts | 7 +- .../track-manual-punishments/modlogSyncBan.ts | 9 +- .../track-manual-punishments/modlogSyncKick.ts | 9 +- .../track-manual-punishments/modlogSyncTimeout.ts | 9 +- .../track-manual-punishments/modlogSyncUnban.ts | 9 +- src/listeners/ws/INTERACTION_CREATE.ts | 7 +- src/tasks/cache/cpuUsage.ts | 4 +- src/tasks/cache/updateCache.ts | 4 +- src/tasks/cache/updateHighlightCache.ts | 5 +- src/tasks/cache/updateNeuItemCache.ts | 4 +- src/tasks/cache/updatePriceItemCache.ts | 4 +- src/tasks/feature/handleReminders.ts | 4 +- src/tasks/feature/removeExpiredPunishements.ts | 12 +-- src/tasks/feature/updateStats.ts | 4 +- src/tasks/stats/guildCount.ts | 5 +- src/tasks/stats/memberCount.ts | 4 +- 219 files changed, 1240 insertions(+), 1321 deletions(-) delete mode 100644 src/listeners/client/dcjsDebug.ts delete mode 100644 src/listeners/client/dcjsError.ts delete mode 100644 src/listeners/client/dcjsWarn.ts create mode 100644 src/listeners/client/djsDebug.ts create mode 100644 src/listeners/client/djsError.ts create mode 100644 src/listeners/client/djsWarn.ts delete mode 100644 src/listeners/guild-custom/bushLockdown.ts delete mode 100644 src/listeners/guild-custom/bushUnlockdown.ts create mode 100644 src/listeners/guild-custom/lockdown.ts create mode 100644 src/listeners/guild-custom/unlockdown.ts delete mode 100644 src/listeners/member-custom/bushBan.ts delete mode 100644 src/listeners/member-custom/bushBlock.ts delete mode 100644 src/listeners/member-custom/bushKick.ts delete mode 100644 src/listeners/member-custom/bushLevelUpdate.ts delete mode 100644 src/listeners/member-custom/bushMute.ts delete mode 100644 src/listeners/member-custom/bushPunishRole.ts delete mode 100644 src/listeners/member-custom/bushPunishRoleRemove.ts delete mode 100644 src/listeners/member-custom/bushPurge.ts delete mode 100644 src/listeners/member-custom/bushRemoveTimeout.ts delete mode 100644 src/listeners/member-custom/bushTimeout.ts delete mode 100644 src/listeners/member-custom/bushUnban.ts delete mode 100644 src/listeners/member-custom/bushUnblock.ts delete mode 100644 src/listeners/member-custom/bushUnmute.ts delete mode 100644 src/listeners/member-custom/bushUpdateModlog.ts delete mode 100644 src/listeners/member-custom/bushUpdateSettings.ts delete mode 100644 src/listeners/member-custom/bushWarn.ts create mode 100644 src/listeners/member-custom/customBan.ts create mode 100644 src/listeners/member-custom/customBlock.ts create mode 100644 src/listeners/member-custom/customKick.ts create mode 100644 src/listeners/member-custom/customMute.ts create mode 100644 src/listeners/member-custom/customPurge.ts create mode 100644 src/listeners/member-custom/customRemoveTimeout.ts create mode 100644 src/listeners/member-custom/customTimeout.ts create mode 100644 src/listeners/member-custom/customUnban.ts create mode 100644 src/listeners/member-custom/customUnblock.ts create mode 100644 src/listeners/member-custom/customUnmute.ts create mode 100644 src/listeners/member-custom/customWarnMember.ts create mode 100644 src/listeners/member-custom/levelUpdate.ts create mode 100644 src/listeners/member-custom/punishRole.ts create mode 100644 src/listeners/member-custom/punishRoleRemove.ts create mode 100644 src/listeners/member-custom/updateModlog.ts create mode 100644 src/listeners/member-custom/updateSettings.ts (limited to 'src') diff --git a/src/bot.ts b/src/bot.ts index c9a7a49..486eb2e 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -1,6 +1,6 @@ console.log('Tanzanite is Starting'); -import { init } from '../lib/utils/BushLogger.js'; +import { init } from '../lib/utils/Logger.js'; // creates proxies on console.log and console.warn // also starts a REPL session init(); @@ -9,12 +9,12 @@ import { config } from '#config'; import { dirname } from 'path'; import { fileURLToPath } from 'url'; import { Sentry } from '../lib/common/Sentry.js'; -import { BushClient } from '../lib/extensions/discord-akairo/BushClient.js'; +import { TanzaniteClient } from '../lib/extensions/discord-akairo/TanzaniteClient.js'; const isDry = process.argv.includes('dry'); if (!isDry && config.credentials.sentryDsn !== null) new Sentry(dirname(fileURLToPath(import.meta.url)) || process.cwd(), config); -BushClient.extendStructures(); -const client = new BushClient(config); +TanzaniteClient.extendStructures(); +const client = new TanzaniteClient(config); // @ts-ignore: for debugging purposes global.client = client; diff --git a/src/commands/_fake-command/ironmoon.ts b/src/commands/_fake-command/ironmoon.ts index cb50c7e..bb4fd88 100644 --- a/src/commands/_fake-command/ironmoon.ts +++ b/src/commands/_fake-command/ironmoon.ts @@ -1,6 +1,6 @@ -import { BushCommand, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, type CommandMessage, type SlashMessage } from '#lib'; -export default class IronmoonCommand extends BushCommand { +export default class IronmoonCommand extends BotCommand { public constructor() { super('ironmoon', { category: 'fake-commands', diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts index 0b09e54..e17a85b 100644 --- a/src/commands/admin/channelPermissions.ts +++ b/src/commands/admin/channelPermissions.ts @@ -1,6 +1,6 @@ import { Arg, - BushCommand, + BotCommand, ButtonPaginator, clientSendAndPermCheck, emojis, @@ -12,7 +12,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, EmbedBuilder, PermissionFlagsBits } from 'discord.js'; -export default class ChannelPermissionsCommand extends BushCommand { +export default class ChannelPermissionsCommand extends BotCommand { public constructor() { super('channelPermissions', { aliases: ['channel-perms', 'cperms', 'cperm', 'chanperms', 'chanperm', 'channel-permissions'], diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts index dda536f..3675891 100644 --- a/src/commands/admin/roleAll.ts +++ b/src/commands/admin/roleAll.ts @@ -1,6 +1,6 @@ import { AllowedMentions, - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, type ArgType, @@ -10,7 +10,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; -export default class RoleAllCommand extends BushCommand { +export default class RoleAllCommand extends BotCommand { public constructor() { super('roleAll', { aliases: ['role-all', 'rall'], diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts index a098f9d..5419658 100644 --- a/src/commands/config/blacklist.ts +++ b/src/commands/config/blacklist.ts @@ -2,7 +2,7 @@ import { addOrRemoveFromArray, AllowedMentions, Arg, - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, format, @@ -13,7 +13,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, GuildMember, PermissionFlagsBits, User } from 'discord.js'; -export default class BlacklistCommand extends BushCommand { +export default class BlacklistCommand extends BotCommand { public constructor() { super('blacklist', { aliases: ['blacklist', 'unblacklist'], diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index 39a44d1..a37d67c 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -1,6 +1,6 @@ import { addOrRemoveFromArray, - BushCommand, + BotCommand, clientSendAndPermCheck, colors, emojis, @@ -47,7 +47,7 @@ export type Action = typeof allActions[number]; type SlashArgType = 'ROLE' | 'STRING' | 'CHANNEL' | 'USER'; type BaseSettingTypes = 'string' | 'channel' | 'role' | 'user' | 'custom'; -export default class ConfigCommand extends BushCommand { +export default class ConfigCommand extends BotCommand { public constructor() { super('config', { aliases: ['config', 'settings', 'setting', 'configure'], diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts index f9abb4a..a4a876c 100644 --- a/src/commands/config/disable.ts +++ b/src/commands/config/disable.ts @@ -2,7 +2,7 @@ import { addOrRemoveFromArray, AllowedMentions, Arg, - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, type ArgType, @@ -15,7 +15,7 @@ import { default as Fuse } from 'fuse.js'; assert(Fuse); -export default class DisableCommand extends BushCommand { +export default class DisableCommand extends BotCommand { private static blacklistedCommands = ['eval', 'disable']; public constructor() { @@ -72,7 +72,7 @@ export default class DisableCommand extends BushCommand { let action = (args.action ?? message.util?.parsed?.alias ?? 'toggle') as 'disable' | 'enable' | 'toggle'; const global = args.global && message.author.isOwner(); const commandID = - args.command instanceof BushCommand ? args.command.id : (await Arg.cast('commandAlias', message, args.command))?.id; + args.command instanceof BotCommand ? args.command.id : (await Arg.cast('commandAlias', message, args.command))?.id; if (!commandID) return await message.util.reply(`${emojis.error} Invalid command.`); diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts index 0036349..55f99bd 100644 --- a/src/commands/config/features.ts +++ b/src/commands/config/features.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, colors, emojis, @@ -20,7 +20,7 @@ import { type SelectMenuInteraction } from 'discord.js'; -export default class FeaturesCommand extends BushCommand { +export default class FeaturesCommand extends BotCommand { public constructor() { super('features', { aliases: ['features'], diff --git a/src/commands/config/log.ts b/src/commands/config/log.ts index f79f60e..f058670 100644 --- a/src/commands/config/log.ts +++ b/src/commands/config/log.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, guildLogsArr, @@ -13,7 +13,7 @@ import assert from 'assert/strict'; import { ArgumentGeneratorReturn } from 'discord-akairo'; import { ApplicationCommandOptionType, ChannelType, PermissionFlagsBits } from 'discord.js'; -export default class LogCommand extends BushCommand { +export default class LogCommand extends BotCommand { public constructor() { super('log', { aliases: ['log', 'logging'], diff --git a/src/commands/dev/__template.ts b/src/commands/dev/__template.ts index df4d146..fbb88ac 100644 --- a/src/commands/dev/__template.ts +++ b/src/commands/dev/__template.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, type ArgType, @@ -9,7 +9,7 @@ import { } from '#lib'; import { ApplicationCommandOptionType } from 'discord.js'; -export default class TemplateCommand extends BushCommand { +export default class TemplateCommand extends BotCommand { public constructor() { super('template', { aliases: ['template'], diff --git a/src/commands/dev/dm.ts b/src/commands/dev/dm.ts index c1340b1..e51651e 100644 --- a/src/commands/dev/dm.ts +++ b/src/commands/dev/dm.ts @@ -1,7 +1,7 @@ -import { BushCommand, clientSendAndPermCheck, emojis, format, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, clientSendAndPermCheck, emojis, format, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import { ApplicationCommandOptionType } from 'discord.js'; -export default class DMCommand extends BushCommand { +export default class DMCommand extends BotCommand { public constructor() { super('dm', { aliases: ['dm'], diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts index dd21454..3929f99 100644 --- a/src/commands/dev/eval.ts +++ b/src/commands/dev/eval.ts @@ -2,10 +2,10 @@ import { ActivePunishment, assertAll, - BushCommand, - BushInspectOptions, + BotCommand, CodeBlockLang, colors, + CustomInspectOptions, emojis, getMethods, Global, @@ -56,9 +56,9 @@ const { transpile } = ts, /* eslint-enable @typescript-eslint/no-unused-vars */ // prettier-ignore -assertAll(ActivePunishment, BushCommand, Global, Guild, Level, ModLog, Shared, StickyRole, Snowflake_, canvas, exec, ActionRow, ButtonComponent, ButtonInteraction, Collection, Collector, CommandInteraction, ContextMenuCommandInteraction, DMChannel, Embed, Emoji, InteractionCollector, Message, Attachment, MessageCollector, OAuth2Scopes, PermissionFlagsBits, PermissionsBitField, ReactionCollector, SelectMenuComponent, path, ts, fileURLToPath, promisify, assert, transpile, sh, SnowflakeUtil, __dirname); +assertAll(ActivePunishment, BotCommand, Global, Guild, Level, ModLog, Shared, StickyRole, Snowflake_, canvas, exec, ActionRow, ButtonComponent, ButtonInteraction, Collection, Collector, CommandInteraction, ContextMenuCommandInteraction, DMChannel, Embed, Emoji, InteractionCollector, Message, Attachment, MessageCollector, OAuth2Scopes, PermissionFlagsBits, PermissionsBitField, ReactionCollector, SelectMenuComponent, path, ts, fileURLToPath, promisify, assert, transpile, sh, SnowflakeUtil, __dirname); -export default class EvalCommand extends BushCommand { +export default class EvalCommand extends BotCommand { public constructor() { super('eval', { aliases: ['eval', 'ev', 'evaluate'], @@ -316,7 +316,7 @@ export default class EvalCommand extends BushCommand { } } -type CodeBlockOptions = BushInspectOptions & { inspectStrings?: boolean }; +type CodeBlockOptions = CustomInspectOptions & { inspectStrings?: boolean }; interface CodeBlockCustomOptions extends CodeBlockOptions { prototype?: boolean; methods?: boolean; diff --git a/src/commands/dev/javascript.ts b/src/commands/dev/javascript.ts index 12ad6f7..43ccf94 100644 --- a/src/commands/dev/javascript.ts +++ b/src/commands/dev/javascript.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, colors, emojis, @@ -13,7 +13,7 @@ import { ApplicationCommandOptionType, EmbedBuilder } from 'discord.js'; import { VM } from 'vm2'; assert(VM); -export default class JavascriptCommand extends BushCommand { +export default class JavascriptCommand extends BotCommand { public constructor() { super('javascript', { aliases: ['javascript', 'js'], diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts index 8125015..2d5b9d9 100644 --- a/src/commands/dev/reload.ts +++ b/src/commands/dev/reload.ts @@ -1,6 +1,6 @@ -import { BushCommand, clientSendAndPermCheck, emojis, formatError, shell, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, clientSendAndPermCheck, emojis, formatError, shell, type CommandMessage, type SlashMessage } from '#lib'; -export default class ReloadCommand extends BushCommand { +export default class ReloadCommand extends BotCommand { public constructor() { super('reload', { aliases: ['reload'], diff --git a/src/commands/dev/say.ts b/src/commands/dev/say.ts index c7b3c40..22ad9ba 100644 --- a/src/commands/dev/say.ts +++ b/src/commands/dev/say.ts @@ -1,7 +1,7 @@ -import { AllowedMentions, BushCommand, emojis, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; +import { AllowedMentions, BotCommand, emojis, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import { ApplicationCommandOptionType } from 'discord.js'; -export default class SayCommand extends BushCommand { +export default class SayCommand extends BotCommand { public constructor() { super('say', { aliases: ['say'], diff --git a/src/commands/dev/servers.ts b/src/commands/dev/servers.ts index ab66f1c..6bba93c 100644 --- a/src/commands/dev/servers.ts +++ b/src/commands/dev/servers.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, ButtonPaginator, chunk, clientSendAndPermCheck, @@ -11,7 +11,7 @@ import { import { stripIndent } from '#tags'; import { type APIEmbed, type Guild } from 'discord.js'; -export default class ServersCommand extends BushCommand { +export default class ServersCommand extends BotCommand { public constructor() { super('servers', { aliases: ['servers', 'guilds'], diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts index 56a3b69..2d2a404 100644 --- a/src/commands/dev/sh.ts +++ b/src/commands/dev/sh.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, colors, emojis, formatError, type CommandMessage, type SlashMessage } from '#lib'; +import { ArgType, BotCommand, colors, emojis, formatError, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; import chalk from 'chalk'; import { exec } from 'child_process'; @@ -15,7 +15,7 @@ const clean = (text: string | any) => { } else return text; }; -export default class ShCommand extends BushCommand { +export default class ShCommand extends BotCommand { public constructor() { super('sh', { aliases: ['sh', 'shell', 'cmd'], diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts index 24e8c9a..6a034bc 100644 --- a/src/commands/dev/superUser.ts +++ b/src/commands/dev/superUser.ts @@ -1,7 +1,7 @@ -import { BushCommand, clientSendAndPermCheck, emojis, format, type ArgType, type CommandMessage } from '#lib'; +import { BotCommand, clientSendAndPermCheck, emojis, format, type ArgType, type CommandMessage } from '#lib'; import { type ArgumentGeneratorReturn, type ArgumentTypeCasterReturn } from 'discord-akairo'; -export default class SuperUserCommand extends BushCommand { +export default class SuperUserCommand extends BotCommand { public constructor() { super('superUser', { aliases: ['super-user', 'su'], diff --git a/src/commands/dev/syncAutomod.ts b/src/commands/dev/syncAutomod.ts index d0fc5e5..7a0fb58 100644 --- a/src/commands/dev/syncAutomod.ts +++ b/src/commands/dev/syncAutomod.ts @@ -1,8 +1,8 @@ -import { BushCommand, clientSendAndPermCheck, emojis, Shared, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, clientSendAndPermCheck, emojis, Shared, type CommandMessage, type SlashMessage } from '#lib'; import typescript from 'typescript'; import { NodeVM } from 'vm2'; -export default class SyncAutomodCommand extends BushCommand { +export default class SyncAutomodCommand extends BotCommand { public constructor() { super('syncAutomod', { aliases: ['sync-automod'], diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts index 0606497..cc32657 100644 --- a/src/commands/dev/test.ts +++ b/src/commands/dev/test.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, ButtonPaginator, clientSendAndPermCheck, colors, @@ -22,7 +22,7 @@ import badLinksSecretArray from '../../../lib/badlinks-secret.js'; import badLinksArray from '../../../lib/badlinks.js'; import badWords from '../../../lib/badwords.js'; -export default class TestCommand extends BushCommand { +export default class TestCommand extends BotCommand { public constructor() { super('test', { aliases: ['test'], diff --git a/src/commands/fun/coinFlip.ts b/src/commands/fun/coinFlip.ts index 3adf7f2..66b6016 100644 --- a/src/commands/fun/coinFlip.ts +++ b/src/commands/fun/coinFlip.ts @@ -1,6 +1,6 @@ -import { BushCommand, clientSendAndPermCheck, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, clientSendAndPermCheck, type CommandMessage, type SlashMessage } from '#lib'; -export default class CoinFlipCommand extends BushCommand { +export default class CoinFlipCommand extends BotCommand { public constructor() { super('coinFlip', { aliases: ['coin-flip', 'cf'], diff --git a/src/commands/fun/dice.ts b/src/commands/fun/dice.ts index e7e5927..5941564 100644 --- a/src/commands/fun/dice.ts +++ b/src/commands/fun/dice.ts @@ -1,6 +1,6 @@ -import { BushCommand, clientSendAndPermCheck, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, clientSendAndPermCheck, type CommandMessage, type SlashMessage } from '#lib'; -export default class DiceCommand extends BushCommand { +export default class DiceCommand extends BotCommand { public constructor() { super('dice', { aliases: ['dice', 'die'], diff --git a/src/commands/fun/eightBall.ts b/src/commands/fun/eightBall.ts index eb5aee8..be9c7b5 100644 --- a/src/commands/fun/eightBall.ts +++ b/src/commands/fun/eightBall.ts @@ -1,7 +1,7 @@ -import { BushCommand, clientSendAndPermCheck, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, clientSendAndPermCheck, type CommandMessage, type SlashMessage } from '#lib'; import { ApplicationCommandOptionType } from 'discord.js'; -export default class EightBallCommand extends BushCommand { +export default class EightBallCommand extends BotCommand { public constructor() { super('eightBall', { aliases: ['eightball', '8ball'], diff --git a/src/commands/fun/minesweeper.ts b/src/commands/fun/minesweeper.ts index f2db6ee..ec21b11 100644 --- a/src/commands/fun/minesweeper.ts +++ b/src/commands/fun/minesweeper.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, OptArgType, @@ -12,7 +12,7 @@ import assert from 'assert/strict'; import { ApplicationCommandOptionType } from 'discord.js'; assert(Minesweeper); -export default class MinesweeperCommand extends BushCommand { +export default class MinesweeperCommand extends BotCommand { public constructor() { super('minesweeper', { aliases: ['minesweeper'], diff --git a/src/commands/info/avatar.ts b/src/commands/info/avatar.ts index 3eae98c..b97364f 100644 --- a/src/commands/info/avatar.ts +++ b/src/commands/info/avatar.ts @@ -1,7 +1,7 @@ -import { Arg, BushCommand, clientSendAndPermCheck, colors, type CommandMessage, type OptArgType, type SlashMessage } from '#lib'; +import { Arg, BotCommand, clientSendAndPermCheck, colors, type CommandMessage, type OptArgType, type SlashMessage } from '#lib'; import { ApplicationCommandOptionType, EmbedBuilder, GuildMember, PermissionFlagsBits } from 'discord.js'; -export default class AvatarCommand extends BushCommand { +export default class AvatarCommand extends BotCommand { public constructor() { super('avatar', { aliases: ['avatar', 'av'], diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts index d84fd4e..64ecf1d 100644 --- a/src/commands/info/botInfo.ts +++ b/src/commands/info/botInfo.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, colors, humanizeDuration, @@ -14,7 +14,7 @@ const { default: prettyBytes } = await import('pretty-bytes'); assert(prettyBytes); assert(os); -export default class BotInfoCommand extends BushCommand { +export default class BotInfoCommand extends BotCommand { public constructor() { super('botInfo', { aliases: ['bot-info', 'stats'], diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts index 7601562..c139e1a 100644 --- a/src/commands/info/color.ts +++ b/src/commands/info/color.ts @@ -1,7 +1,7 @@ import { AllowedMentions, Arg, - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, type ArgType, @@ -13,7 +13,7 @@ import { ApplicationCommandOptionType, EmbedBuilder, GuildMember, PermissionFlag import tinycolor from 'tinycolor2'; assert(tinycolor); -export default class ColorCommand extends BushCommand { +export default class ColorCommand extends BotCommand { public constructor() { super('color', { aliases: ['color'], diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts index e67cdf4..97e4be3 100644 --- a/src/commands/info/guildInfo.ts +++ b/src/commands/info/guildInfo.ts @@ -1,7 +1,7 @@ import { akairo, Arg, - BushCommand, + BotCommand, clientSendAndPermCheck, colors, emojis, @@ -31,7 +31,7 @@ import { type Vanity } from 'discord.js'; -export default class GuildInfoCommand extends BushCommand { +export default class GuildInfoCommand extends BotCommand { public constructor() { super('guildInfo', { aliases: ['guild-info', 'serverinfo', 'guild', 'server', 'g'], @@ -222,9 +222,9 @@ export default class GuildInfoCommand extends BushCommand { const guildSecurity: string[] = []; guildSecurity.push( - `**Verification Level:** ${BushGuildVerificationLevel[guild.verificationLevel]}`, - `**Explicit Content Filter:** ${BushGuildExplicitContentFilter[guild.explicitContentFilter]}`, - `**Default Message Notifications:** ${BushGuildDefaultMessageNotifications[guild.defaultMessageNotifications]}`, + `**Verification Level:** ${MappedGuildVerificationLevel[guild.verificationLevel]}`, + `**Explicit Content Filter:** ${MappedGuildExplicitContentFilter[guild.explicitContentFilter]}`, + `**Default Message Notifications:** ${MappedGuildDefaultMessageNotifications[guild.defaultMessageNotifications]}`, `**2FA Required:** ${guild.mfaLevel === GuildMFALevel.Elevated ? 'True' : 'False'}` ); @@ -248,7 +248,7 @@ type RTCRegion = | 'india' | 'automatic'; -enum BushGuildVerificationLevel { +enum MappedGuildVerificationLevel { 'None' = GuildVerificationLevel.None, 'Low' = GuildVerificationLevel.Low, 'Medium' = GuildVerificationLevel.Medium, @@ -256,13 +256,13 @@ enum BushGuildVerificationLevel { 'Very High' = GuildVerificationLevel.VeryHigh } -enum BushGuildExplicitContentFilter { +enum MappedGuildExplicitContentFilter { 'Disabled' = GuildExplicitContentFilter.Disabled, 'Members Without Roles' = GuildExplicitContentFilter.MembersWithoutRoles, 'All Members' = GuildExplicitContentFilter.AllMembers } -enum BushGuildDefaultMessageNotifications { +enum MappedGuildDefaultMessageNotifications { 'All Messages' = GuildDefaultMessageNotifications.AllMessages, 'Only Mentions' = GuildDefaultMessageNotifications.OnlyMentions } diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index 70c8f20..6460b99 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, colors, format, @@ -26,7 +26,7 @@ import packageDotJSON from '../../../package.json' assert { type: 'json' }; assert(Fuse); assert(packageDotJSON); -export default class HelpCommand extends BushCommand { +export default class HelpCommand extends BotCommand { public constructor() { super('help', { aliases: ['help'], @@ -109,7 +109,7 @@ export default class HelpCommand extends BushCommand { return message.util.reply({ embeds: [embed], components: row.components.length ? [row] : undefined }); } - private helpIndividual(message: CommandMessage | SlashMessage, row: ActionRowBuilder, command: BushCommand) { + private helpIndividual(message: CommandMessage | SlashMessage, row: ActionRowBuilder, command: BotCommand) { const embed = new EmbedBuilder().setColor(colors.default).setTitle(`${command.id} Command`); let description = `${command.description ?? '*This command does not have a description.*'}`; @@ -127,7 +127,7 @@ export default class HelpCommand extends BushCommand { return message.util.reply(params); } - private addCommandUsage(embed: EmbedBuilder, command: BushCommand): void { + private addCommandUsage(embed: EmbedBuilder, command: BotCommand): void { if (command.usage?.length) { embed.addFields({ name: `» Usage${command.usage.length > 1 ? 's' : ''}`, @@ -136,7 +136,7 @@ export default class HelpCommand extends BushCommand { } } - private addCommandExamples(embed: EmbedBuilder, command: BushCommand): void { + private addCommandExamples(embed: EmbedBuilder, command: BotCommand): void { if (command.examples?.length) { embed.addFields({ name: `» Example${command.examples.length > 1 ? 's' : ''}`, @@ -145,7 +145,7 @@ export default class HelpCommand extends BushCommand { } } - private addCommandAliases(embed: EmbedBuilder, command: BushCommand): void { + private addCommandAliases(embed: EmbedBuilder, command: BotCommand): void { if (command.aliases?.length > 1) embed.addFields({ name: '» Aliases', @@ -153,7 +153,7 @@ export default class HelpCommand extends BushCommand { }); } - private addCommandArguments(embed: EmbedBuilder, command: BushCommand, isOwner = false, isSuperUser = false): void { + private addCommandArguments(embed: EmbedBuilder, command: BotCommand, isOwner = false, isSuperUser = false): void { const format = (id: string, req: boolean) => `${req ? '<' : '['}${id}${req ? '>' : ']'}`; const args = (command.argsInfo ?? []).filter((arg) => { if (arg.ownerOnly && !isOwner) return false; @@ -182,7 +182,7 @@ export default class HelpCommand extends BushCommand { } } - private addCommandRestrictions(embed: EmbedBuilder, command: BushCommand): void { + private addCommandRestrictions(embed: EmbedBuilder, command: BotCommand): void { if ( command.ownerOnly || command.superUserOnly || diff --git a/src/commands/info/icon.ts b/src/commands/info/icon.ts index b3434ec..71f02f9 100644 --- a/src/commands/info/icon.ts +++ b/src/commands/info/icon.ts @@ -1,8 +1,8 @@ -import { BushCommand, clientSendAndPermCheck, colors, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, clientSendAndPermCheck, colors, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; import { EmbedBuilder, escapeMarkdown, PermissionFlagsBits } from 'discord.js'; -export default class IconCommand extends BushCommand { +export default class IconCommand extends BotCommand { public constructor() { super('icon', { aliases: ['icon', 'guildavatar', 'severicon', 'guildicon'], diff --git a/src/commands/info/inviteInfo.ts b/src/commands/info/inviteInfo.ts index 5df86ad..590bf16 100644 --- a/src/commands/info/inviteInfo.ts +++ b/src/commands/info/inviteInfo.ts @@ -1,7 +1,7 @@ -import { Arg, ArgType, BushCommand, clientSendAndPermCheck, colors, type CommandMessage, type SlashMessage } from '#lib'; +import { Arg, ArgType, BotCommand, clientSendAndPermCheck, colors, type CommandMessage, type SlashMessage } from '#lib'; import { ApplicationCommandOptionType, EmbedBuilder, Invite, PermissionFlagsBits } from 'discord.js'; -export default class InviteInfoCommand extends BushCommand { +export default class InviteInfoCommand extends BotCommand { public constructor() { super('inviteInfo', { aliases: ['invite-info', 'ii'], diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts index 8003c65..ecc09c8 100644 --- a/src/commands/info/links.ts +++ b/src/commands/info/links.ts @@ -1,11 +1,11 @@ -import { BushCommand, clientSendAndPermCheck, invite, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, clientSendAndPermCheck, invite, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert/strict'; import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from 'discord.js'; import packageDotJSON from '../../../package.json' assert { type: 'json' }; assert(packageDotJSON); -export default class LinksCommand extends BushCommand { +export default class LinksCommand extends BotCommand { public constructor() { super('links', { aliases: ['links', 'invite', 'inv', 'support', 'github', 'source', 'oss'], diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts index 484c010..91bec1d 100644 --- a/src/commands/info/ping.ts +++ b/src/commands/info/ping.ts @@ -1,7 +1,7 @@ -import { BushCommand, clientSendAndPermCheck, colors, format, type CommandMessage, type SlashMessage } from '#lib'; +import { BotCommand, clientSendAndPermCheck, colors, format, type CommandMessage, type SlashMessage } from '#lib'; import { EmbedBuilder, PermissionFlagsBits, type Message } from 'discord.js'; -export default class PingCommand extends BushCommand { +export default class PingCommand extends BotCommand { public constructor() { super('ping', { aliases: ['ping'], diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts index 0063f4c..47061fc 100644 --- a/src/commands/info/pronouns.ts +++ b/src/commands/info/pronouns.ts @@ -1,6 +1,6 @@ import { AllowedMentions, - BushCommand, + BotCommand, clientSendAndPermCheck, type CommandMessage, type OptArgType, @@ -8,7 +8,7 @@ import { } from '#lib'; import { ApplicationCommandOptionType, EmbedBuilder, escapeMarkdown, PermissionFlagsBits } from 'discord.js'; -export default class PronounsCommand extends BushCommand { +export default class PronounsCommand extends BotCommand { public constructor() { super('pronouns', { aliases: ['pronouns', 'pronoun'], diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts index f30330a..deaf41c 100644 --- a/src/commands/info/snowflake.ts +++ b/src/commands/info/snowflake.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, colors, timestamp, @@ -19,7 +19,7 @@ import { type Snowflake } from 'discord.js'; -export default class SnowflakeCommand extends BushCommand { +export default class SnowflakeCommand extends BotCommand { public constructor() { super('snowflake', { aliases: ['snowflake', 'info', 'sf'], @@ -50,7 +50,7 @@ export default class SnowflakeCommand extends BushCommand { // Channel if (this.client.channels.cache.has(snowflake)) { const channel = this.client.channels.resolve(snowflake)!; - const channelInfo = [`**Type:** ${BushChannelType[channel.type] ?? ChannelType[channel.type]}`]; + const channelInfo = [`**Type:** ${MappedChannelType[channel.type] ?? ChannelType[channel.type]}`]; if (channel.type === ChannelType.DM) { channelInfo.push( `**Recipient:** ${escapeMarkdown(channel.recipient?.tag ?? '¯\\_(ツ)_/¯')} (${channel.recipient?.id ?? '¯\\_(ツ)_/¯'})` @@ -136,7 +136,7 @@ export default class SnowflakeCommand extends BushCommand { } } -enum BushChannelType { +enum MappedChannelType { 'Text' = 0, 'DM' = 1, 'Voice' = 2, diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index 1f139b5..52875ef 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -1,7 +1,7 @@ import { Arg, + BotCommand, bots, - BushCommand, clientSendAndPermCheck, colors, emojis, @@ -30,7 +30,7 @@ import { type User } from 'discord.js'; -export default class UserInfoCommand extends BushCommand { +export default class UserInfoCommand extends BotCommand { public constructor() { super('userInfo', { aliases: ['user-info', 'user', 'u'], diff --git a/src/commands/leveling/leaderboard.ts b/src/commands/leveling/leaderboard.ts index bb41a12..109f398 100644 --- a/src/commands/leveling/leaderboard.ts +++ b/src/commands/leveling/leaderboard.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, ButtonPaginator, chunk, clientSendAndPermCheck, @@ -12,7 +12,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, EmbedBuilder, PermissionFlagsBits } from 'discord.js'; -export default class LeaderboardCommand extends BushCommand { +export default class LeaderboardCommand extends BotCommand { public constructor() { super('leaderboard', { aliases: ['leaderboard', 'lb'], diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts index ea2a724..2547b06 100644 --- a/src/commands/leveling/level.ts +++ b/src/commands/leveling/level.ts @@ -1,6 +1,6 @@ import { AllowedMentions, - BushCommand, + BotCommand, CanvasProgressBar, clientSendAndPermCheck, emojis, @@ -16,7 +16,7 @@ import { ApplicationCommandOptionType, AttachmentBuilder, Guild, PermissionFlags assert(canvas); assert(SimplifyNumber); -export default class LevelCommand extends BushCommand { +export default class LevelCommand extends BotCommand { public constructor() { super('level', { aliases: ['level', 'rank', 'lvl'], diff --git a/src/commands/leveling/levelRoles.ts b/src/commands/leveling/levelRoles.ts index 312623c..4973b01 100644 --- a/src/commands/leveling/levelRoles.ts +++ b/src/commands/leveling/levelRoles.ts @@ -1,6 +1,6 @@ import { AllowedMentions, - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, type ArgType, @@ -11,7 +11,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; -export default class LevelRolesCommand extends BushCommand { +export default class LevelRolesCommand extends BotCommand { public constructor() { super('levelRole', { aliases: ['level-role', 'level-roles', 'lr'], diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts index 8dc1cdf..cd30978 100644 --- a/src/commands/leveling/setLevel.ts +++ b/src/commands/leveling/setLevel.ts @@ -1,6 +1,6 @@ import { AllowedMentions, - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, format, @@ -12,7 +12,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; -export default class SetLevelCommand extends BushCommand { +export default class SetLevelCommand extends BotCommand { public constructor() { super('setLevel', { aliases: ['set-level'], diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts index 5cd3a61..23f4463 100644 --- a/src/commands/leveling/setXp.ts +++ b/src/commands/leveling/setXp.ts @@ -1,6 +1,6 @@ import { AllowedMentions, - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, format, @@ -12,7 +12,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; -export default class SetXpCommand extends BushCommand { +export default class SetXpCommand extends BotCommand { public constructor() { super('setXp', { aliases: ['set-xp'], diff --git a/src/commands/moderation/_activePunishments.ts b/src/commands/moderation/_activePunishments.ts index 06e33f2..4ded902 100644 --- a/src/commands/moderation/_activePunishments.ts +++ b/src/commands/moderation/_activePunishments.ts @@ -1,6 +1,6 @@ // import { -// BushCommand, // clientSendAndPermCheck, +// CustomCommand, // emojis, // ModLog, // ModLogModel, @@ -14,7 +14,7 @@ // const punishmentTypes = ['ban', 'kick', 'mute', 'warn', 'role'] as const; -// export default class ActivePunishmentsCommand extends BushCommand { +// export default class ActivePunishmentsCommand extends CustomCommand { // public constructor() { // super('activePunishments', { // aliases: ['active-punishments', 'ap'], diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index 00fde01..fdb8033 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -2,7 +2,7 @@ import { AllowedMentions, Arg, banResponse, - BushCommand, + BotCommand, castDurationContent, emojis, format, @@ -16,7 +16,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, PermissionFlagsBits, type User } from 'discord.js'; -export default class BanCommand extends BushCommand { +export default class BanCommand extends BotCommand { public constructor() { super('ban', { aliases: ['ban', 'force-ban', 'dban'], @@ -108,7 +108,7 @@ export default class BanCommand extends BushCommand { const opts = { reason: content, moderator: message.member, duration: duration, deleteDays: args.days }; - const responseCode = member ? await member.bushBan(opts) : await message.guild.bushBan({ user, ...opts }); + const responseCode = member ? await member.customBan(opts) : await message.guild.customBan({ user, ...opts }); return await message.util.reply({ content: BanCommand.formatCode(user, responseCode), diff --git a/src/commands/moderation/block.ts b/src/commands/moderation/block.ts index 00a1996..a3f7bc1 100644 --- a/src/commands/moderation/block.ts +++ b/src/commands/moderation/block.ts @@ -1,7 +1,7 @@ import { AllowedMentions, blockResponse, - BushCommand, + BotCommand, castDurationContent, clientSendAndPermCheck, emojis, @@ -17,7 +17,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; -export default class BlockCommand extends BushCommand { +export default class BlockCommand extends BotCommand { public constructor() { super('block', { aliases: ['block'], @@ -91,7 +91,7 @@ export default class BlockCommand extends BushCommand { return message.util.reply(canModerateResponse); } - const responseCode = await member.bushBlock({ + const responseCode = await member.customBlock({ reason: content, moderator: message.member, duration: duration, diff --git a/src/commands/moderation/evidence.ts b/src/commands/moderation/evidence.ts index d36000f..bc4cdb2 100644 --- a/src/commands/moderation/evidence.ts +++ b/src/commands/moderation/evidence.ts @@ -1,11 +1,12 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, format, ModLog, OptArgType, regex, + TanzaniteEvent, userGuildPermCheck, type ArgType, type CommandMessage, @@ -15,7 +16,7 @@ import assert from 'assert/strict'; import { Argument, ArgumentGeneratorReturn } from 'discord-akairo'; import { ApplicationCommandOptionType, PermissionFlagsBits, type Message } from 'discord.js'; -export default class EvidenceCommand extends BushCommand { +export default class EvidenceCommand extends BotCommand { public constructor() { super('evidence', { aliases: ['evidence'], @@ -122,7 +123,7 @@ export default class EvidenceCommand extends BushCommand { entry.evidence = _evidence.trim(); await entry.save(); - this.client.emit('bushUpdateModlog', message.member!, entry.id, 'evidence', oldEntry, entry.evidence); + this.client.emit(TanzaniteEvent.UpdateModlog, message.member!, entry.id, 'evidence', oldEntry, entry.evidence); return message.util.reply(`${emojis.success} Successfully updated the evidence for case ${format.input(entry.id)}.`); } diff --git a/src/commands/moderation/hideCase.ts b/src/commands/moderation/hideCase.ts index 9bd1d24..ca87ea5 100644 --- a/src/commands/moderation/hideCase.ts +++ b/src/commands/moderation/hideCase.ts @@ -1,9 +1,10 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, format, ModLog, + TanzaniteEvent, userGuildPermCheck, type CommandMessage, type SlashMessage @@ -11,7 +12,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; -export default class HideCaseCommand extends BushCommand { +export default class HideCaseCommand extends BotCommand { public constructor() { super('hideCase', { aliases: ['hide-case', 'hide_case', 'show-case', 'show_case', 'cover-up-mod-abuse', 'cover_up_mod_abuse'], @@ -47,7 +48,7 @@ export default class HideCaseCommand extends BushCommand { entry.hidden = !entry.hidden; await entry.save(); - this.client.emit('bushUpdateModlog', message.member!, entry.id, 'hidden', oldEntry, entry.hidden); + this.client.emit(TanzaniteEvent.UpdateModlog, message.member!, entry.id, 'hidden', oldEntry, entry.hidden); return await message.util.reply(`${emojis.success} CaseID ${format.input(caseID)} is ${action}.`); } diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index 7807166..a5938f8 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -1,6 +1,6 @@ import { AllowedMentions, - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, format, @@ -15,7 +15,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; -export default class KickCommand extends BushCommand { +export default class KickCommand extends BotCommand { public constructor() { super('kick', { aliases: ['kick'], @@ -77,7 +77,7 @@ export default class KickCommand extends BushCommand { return message.util.reply(canModerateResponse); } - const responseCode = await member.bushKick({ + const responseCode = await member.customKick({ reason, moderator: message.member }); diff --git a/src/commands/moderation/lockdown.ts b/src/commands/moderation/lockdown.ts index 0561767..57f9caf 100644 --- a/src/commands/moderation/lockdown.ts +++ b/src/commands/moderation/lockdown.ts @@ -1,6 +1,6 @@ import { AllowedMentions, - BushCommand, + BotCommand, clientSendAndPermCheck, colors, ConfirmationPrompt, @@ -23,7 +23,7 @@ import { VoiceChannel } from 'discord.js'; -export default class LockdownCommand extends BushCommand { +export default class LockdownCommand extends BotCommand { public constructor() { super('lockdown', { aliases: ['lockdown', 'lock'], diff --git a/src/commands/moderation/massBan.ts b/src/commands/moderation/massBan.ts index db50c44..4ba4f47 100644 --- a/src/commands/moderation/massBan.ts +++ b/src/commands/moderation/massBan.ts @@ -2,12 +2,13 @@ import { Arg, BanResponse, banResponse, - BushCommand, + BotCommand, clientSendAndPermCheck, colors, emojis, overflowEmbed, regex, + TanzaniteEvent, type ArgType, type CommandMessage, type OptArgType, @@ -16,7 +17,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, Collection, PermissionFlagsBits } from 'discord.js'; -export default class MassBanCommand extends BushCommand { +export default class MassBanCommand extends BotCommand { public constructor() { super('massBan', { aliases: ['mass-ban', 'mass-dban'], @@ -96,7 +97,13 @@ export default class MassBanCommand extends BushCommand { const res = await Promise.all(promises); const map = new Collection(res.map((r, i) => [ids[i], r])); - this.client.emit('massBan', message.member!, message.guild!, args.reason ? args.reason.trim() : 'No reason provided.', map); + this.client.emit( + TanzaniteEvent.MassBan, + message.member!, + message.guild!, + args.reason ? args.reason.trim() : 'No reason provided.', + map + ); const success = (res: BanResponse): boolean => [banResponse.SUCCESS, banResponse.DM_ERROR].includes(res as any); diff --git a/src/commands/moderation/massEvidence.ts b/src/commands/moderation/massEvidence.ts index cecf273..b44060e 100644 --- a/src/commands/moderation/massEvidence.ts +++ b/src/commands/moderation/massEvidence.ts @@ -1,11 +1,12 @@ import { - BushCommand, + BotCommand, clientSendAndPermCheck, colors, emojis, ModLog, overflowEmbed, regex, + TanzaniteEvent, type ArgType, type CommandMessage, type OptArgType, @@ -15,7 +16,7 @@ import assert from 'assert/strict'; import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; import EvidenceCommand from './evidence.js'; -export default class MassEvidenceCommand extends BushCommand { +export default class MassEvidenceCommand extends BotCommand { public constructor() { super('massEvidence', { aliases: ['mass-evidence'], @@ -93,7 +94,7 @@ export default class MassEvidenceCommand extends BushCommand { return `${emojis.success} ${id} - ${case_.id}`; }); - this.client.emit('massEvidence', message.member!, message.guild, evidence, lines); + this.client.emit(TanzaniteEvent.MassEvidence, message.member!, message.guild, evidence, lines); const embeds = overflowEmbed( { diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index 527ba36..08e5397 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -1,6 +1,6 @@ import { Arg, - BushCommand, + BotCommand, ButtonPaginator, chunk, clientSendAndPermCheck, @@ -17,7 +17,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, escapeMarkdown, PermissionFlagsBits, User } from 'discord.js'; -export default class ModlogCommand extends BushCommand { +export default class ModlogCommand extends BotCommand { public static separator = '\n━━━━━━━━━━━━━━━\n'; public constructor() { diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 4627f2c..debcf03 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -1,6 +1,6 @@ import { AllowedMentions, - BushCommand, + BotCommand, castDurationContent, clientSendAndPermCheck, emojis, @@ -17,7 +17,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js'; -export default class MuteCommand extends BushCommand { +export default class MuteCommand extends BotCommand { public constructor() { super('mute', { aliases: ['mute'], @@ -86,7 +86,7 @@ export default class MuteCommand extends BushCommand { return message.util.reply(canModerateResponse); } - const responseCode = await member.bushMute({ + const responseCode = await member.customMute({ reason: content, moderator: message.member, duration diff --git a/src/commands/moderation/myLogs.ts b/src/commands/moderation/myLogs.ts index c1cc448..34ab8e0 100644 --- a/src/commands/moderation/myLogs.ts +++ b/src/commands/moderation/myLogs.ts @@ -1,5 +1,5 @@ import { - BushCommand, + BotCommand, ButtonPaginator, chunk, clientSendAndPermCheck, @@ -14,7 +14,7 @@ import { import { ApplicationCommandOptionType } from 'discord.js'; import { input, sanitizeInputForDiscord } from '../../../lib/utils/Format.js'; import ModlogCommand from './modlog.js'; -export default class MyLogsCommand extends BushCommand { +export default class MyLogsCommand extends BotCommand { public constructor() { super('myLogs', { aliases: ['my-logs', 'my-log', 'my-modlogs', 'my-modlog'], diff --git a/src/commands/moderation/purge.ts b/src/commands/moderation/purge.ts index 383c439..106f394 100644 --- a/src/commands/moderation/purge.ts +++ b/src/commands/moderation/purge.ts @@ -1,9 +1,10 @@ import { Arg, - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, OptArgType, + TanzaniteEvent, type ArgType, type CommandMessage, type SlashMessage @@ -11,7 +12,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, Collection, PermissionFlagsBits, type Message } from 'discord.js'; -export default class PurgeCommand extends BushCommand { +export default class PurgeCommand extends BotCommand { public constructor() { super('purge', { aliases: ['purge', 'clear'], @@ -83,7 +84,7 @@ export default class PurgeCommand extends BushCommand { const purged = await message.channel!.bulkDelete(messages, true).catch(() => null); if (!purged) return message.util.reply(`${emojis.error} Failed to purge messages.`).catch(() => null); else { - this.client.emit('bushPurge', message.author, message.guild, message.channel!, messages); + this.client.emit(TanzaniteEvent.Purge, message.author, message.guild, message.channel!, messages); await message.util.send(`${emojis.success} Successfully purged **${purged.size}** messages.`); /* .then(async (purgeMessage) => { if (!message.util.isSlashMessage(message)) { diff --git a/src/commands/moderation/removeReactionEmoji.ts b/src/commands/moderation/removeReactionEmoji.ts index cc3713c..5baeffc 100644 --- a/src/commands/moderation/removeReactionEmoji.ts +++ b/src/commands/moderation/removeReactionEmoji.ts @@ -1,6 +1,6 @@ import { Arg, - BushCommand, + BotCommand, clientSendAndPermCheck, emojis, format, @@ -11,7 +11,7 @@ import { import assert from 'assert/strict'; import { ApplicationCommandOptionType, Message, PermissionFlagsBits } from 'discord.js'; -export default class RemoveReactionEmojiCommand extends BushCommand { +export default class RemoveReactionEmojiCommand extends BotCommand { public constructor() { super('removeReactionEmoji', { aliases: ['remove-reaction-emoji', 'rre'], diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index 5251be7..6b874da 100644 --- a/src/commands/moderat