From 13894f2beffc776a56ac03868613b4313dfb57bf Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 1 Nov 2021 15:40:31 -0400 Subject: convert to esm --- .vscode/settings.json | 3 +- package.json | 24 ++-- src/arguments/abbreviatedNumber.ts | 2 +- src/arguments/contentWithDuration.ts | 2 +- src/arguments/discordEmoji.ts | 2 +- src/arguments/duration.ts | 2 +- src/arguments/durationSeconds.ts | 2 +- src/arguments/globalUser.ts | 2 +- src/arguments/permission.ts | 2 +- src/arguments/roleWithDuation.ts | 14 -- src/arguments/roleWithDuration.ts | 14 ++ src/arguments/snowflake.ts | 2 +- src/bot.ts | 12 +- src/commands/_fake-command/ironmoon.ts | 2 +- src/commands/admin/channelPermissions.ts | 2 +- src/commands/admin/roleAll.ts | 2 +- src/commands/config/blacklist.ts | 2 +- src/commands/config/config.ts | 28 ++-- src/commands/config/customAutomodPhrases.ts | 2 +- src/commands/config/disable.ts | 2 +- src/commands/config/features.ts | 8 +- src/commands/config/levelRoles.ts | 2 +- src/commands/config/log.ts | 2 +- src/commands/dev/__template.ts | 2 +- src/commands/dev/eval.ts | 8 +- src/commands/dev/reload.ts | 2 +- src/commands/dev/say.ts | 2 +- src/commands/dev/servers.ts | 2 +- src/commands/dev/sh.ts | 2 +- src/commands/dev/superUser.ts | 2 +- src/commands/dev/test.ts | 14 +- src/commands/fun/coinflip.ts | 2 +- src/commands/fun/dice.ts | 2 +- src/commands/fun/eightBall.ts | 2 +- src/commands/fun/minesweeper.ts | 2 +- src/commands/info/avatar.ts | 2 +- src/commands/info/botInfo.ts | 2 +- src/commands/info/color.ts | 2 +- src/commands/info/guildInfo.ts | 2 +- src/commands/info/help.ts | 2 +- src/commands/info/icon.ts | 2 +- src/commands/info/links.ts | 2 +- src/commands/info/ping.ts | 2 +- src/commands/info/pronouns.ts | 2 +- src/commands/info/snowflake.ts | 32 ++--- src/commands/info/userInfo.ts | 2 +- src/commands/leveling/leaderboard.ts | 2 +- src/commands/leveling/level.ts | 13 +- src/commands/leveling/setLevel.ts | 2 +- src/commands/leveling/setXp.ts | 2 +- src/commands/moderation/_lockdown.ts | 2 +- src/commands/moderation/ban.ts | 2 +- src/commands/moderation/evidence.ts | 2 +- src/commands/moderation/hideCase.ts | 2 +- src/commands/moderation/kick.ts | 2 +- src/commands/moderation/modlog.ts | 2 +- src/commands/moderation/mute.ts | 2 +- src/commands/moderation/purge.ts | 2 +- src/commands/moderation/removeReactionEmoji.ts | 2 +- src/commands/moderation/role.ts | 2 +- src/commands/moderation/slowmode.ts | 2 +- src/commands/moderation/unban.ts | 2 +- src/commands/moderation/unmute.ts | 2 +- src/commands/moderation/warn.ts | 2 +- src/commands/moulberry-bush/capePerms.ts | 2 +- src/commands/moulberry-bush/capes.ts | 2 +- src/commands/moulberry-bush/giveawayPing.ts | 2 +- src/commands/moulberry-bush/moulHammer.ts | 2 +- src/commands/moulberry-bush/report.ts | 2 +- src/commands/moulberry-bush/rule.ts | 2 +- src/commands/moulberry-bush/serverStatus.ts | 2 +- src/commands/utilities/activity.ts | 2 +- src/commands/utilities/calculator.ts | 2 +- src/commands/utilities/decode.ts | 2 +- src/commands/utilities/hash.ts | 2 +- src/commands/utilities/price.ts | 2 +- src/commands/utilities/steal.ts | 2 +- src/commands/utilities/suicide.ts | 2 +- src/commands/utilities/uuid.ts | 2 +- src/commands/utilities/viewRaw.ts | 2 +- src/commands/utilities/whoHasRole.ts | 2 +- src/commands/utilities/wolframAlpha.ts | 2 +- src/config/example-options.ts | 2 +- src/context-menu-commands/message/viewRaw.ts | 4 +- src/inhibitors/blacklist/channelGlobalBlacklist.ts | 2 +- src/inhibitors/blacklist/channelGuildBlacklist.ts | 2 +- src/inhibitors/blacklist/guildBlacklist.ts | 2 +- src/inhibitors/blacklist/userGlobalBlacklist.ts | 2 +- src/inhibitors/blacklist/userGuildBlacklist.ts | 2 +- src/inhibitors/checks/fatal.ts | 2 +- src/inhibitors/checks/guildUnavailable.ts | 2 +- src/inhibitors/command/dm.ts | 2 +- src/inhibitors/command/globalDisabledCommand.ts | 2 +- src/inhibitors/command/guild.ts | 2 +- src/inhibitors/command/guildDisabledCommand.ts | 2 +- src/inhibitors/command/nsfw.ts | 2 +- src/inhibitors/command/owner.ts | 2 +- src/inhibitors/command/restrictedChannel.ts | 2 +- src/inhibitors/command/restrictedGuild.ts | 2 +- src/inhibitors/command/superUser.ts | 2 +- src/lib/badwords.ts | 2 +- src/lib/common/AutoMod.ts | 8 +- src/lib/common/ButtonPaginator.ts | 14 +- src/lib/common/DeleteButton.ts | 2 +- src/lib/common/Format.ts | 2 +- src/lib/common/Moderation.ts | 18 +-- src/lib/common/Sentry.ts | 2 +- src/lib/common/util/Arg.ts | 2 +- .../discord-akairo/BushArgumentTypeCaster.ts | 2 +- src/lib/extensions/discord-akairo/BushClient.ts | 137 +++++++++--------- .../extensions/discord-akairo/BushClientUtil.ts | 18 +-- src/lib/extensions/discord-akairo/BushCommand.ts | 2 +- .../discord-akairo/BushCommandHandler.ts | 2 +- .../extensions/discord-akairo/BushCommandUtil.ts | 2 +- src/lib/extensions/discord-akairo/BushInhibitor.ts | 2 +- .../discord-akairo/BushInhibitorHandler.ts | 2 +- src/lib/extensions/discord-akairo/BushListener.ts | 2 +- .../discord-akairo/BushListenerHandler.ts | 2 +- .../extensions/discord-akairo/BushSlashMessage.ts | 2 +- src/lib/extensions/discord-akairo/BushTask.ts | 2 +- .../extensions/discord-akairo/BushTaskHandler.ts | 2 +- src/lib/extensions/discord.js/BushActivity.ts | 4 +- .../discord.js/BushApplicationCommand.ts | 4 +- .../discord.js/BushApplicationCommandManager.d.ts | 22 +-- .../BushApplicationCommandPermissionsManager.d.ts | 9 +- .../discord.js/BushBaseGuildEmojiManager.d.ts | 2 +- .../discord.js/BushBaseGuildTextChannel.ts | 18 +-- .../extensions/discord.js/BushButtonInteraction.ts | 6 +- .../extensions/discord.js/BushCategoryChannel.ts | 2 +- src/lib/extensions/discord.js/BushChannel.d.ts | 6 +- .../extensions/discord.js/BushChannelManager.d.ts | 4 +- .../extensions/discord.js/BushClientEvents.d.ts | 76 +++++----- src/lib/extensions/discord.js/BushClientUser.d.ts | 16 +-- .../discord.js/BushCommandInteraction.ts | 22 +-- src/lib/extensions/discord.js/BushDMChannel.ts | 4 +- src/lib/extensions/discord.js/BushEmoji.ts | 4 +- src/lib/extensions/discord.js/BushGuild.ts | 30 ++-- .../BushGuildApplicationCommandManager.d.ts | 6 +- src/lib/extensions/discord.js/BushGuildBan.d.ts | 4 +- src/lib/extensions/discord.js/BushGuildChannel.ts | 4 +- src/lib/extensions/discord.js/BushGuildEmoji.ts | 4 +- .../discord.js/BushGuildEmojiRoleManager.d.ts | 2 +- .../extensions/discord.js/BushGuildManager.d.ts | 2 +- src/lib/extensions/discord.js/BushGuildMember.ts | 4 +- .../discord.js/BushGuildMemberManager.d.ts | 18 +-- src/lib/extensions/discord.js/BushMessage.ts | 20 +-- .../extensions/discord.js/BushMessageManager.d.ts | 17 +-- .../extensions/discord.js/BushMessageReaction.ts | 4 +- src/lib/extensions/discord.js/BushNewsChannel.ts | 2 +- src/lib/extensions/discord.js/BushPresence.ts | 4 +- src/lib/extensions/discord.js/BushReactionEmoji.ts | 4 +- src/lib/extensions/discord.js/BushRole.ts | 4 +- .../discord.js/BushSelectMenuInteraction.ts | 6 +- src/lib/extensions/discord.js/BushStageChannel.ts | 4 +- src/lib/extensions/discord.js/BushStageInstance.ts | 4 +- src/lib/extensions/discord.js/BushStoreChannel.ts | 4 +- src/lib/extensions/discord.js/BushTextChannel.ts | 4 +- src/lib/extensions/discord.js/BushThreadChannel.ts | 20 +-- .../extensions/discord.js/BushThreadManager.d.ts | 8 +- src/lib/extensions/discord.js/BushThreadMember.ts | 4 +- .../discord.js/BushThreadMemberManager.d.ts | 4 +- src/lib/extensions/discord.js/BushUser.ts | 4 +- src/lib/extensions/discord.js/BushUserManager.d.ts | 4 +- src/lib/extensions/discord.js/BushVoiceChannel.ts | 4 +- src/lib/extensions/discord.js/BushVoiceState.ts | 4 +- src/lib/extensions/global.d.ts | 3 +- src/lib/index.ts | 156 ++++++++++----------- src/lib/models/ActivePunishment.ts | 7 +- src/lib/models/BaseModel.ts | 2 +- src/lib/models/Global.ts | 8 +- src/lib/models/Guild.ts | 14 +- src/lib/models/Level.ts | 6 +- src/lib/models/ModLog.ts | 8 +- src/lib/models/Stat.ts | 8 +- src/lib/models/StickyRole.ts | 8 +- src/lib/models/__helpers.ts | 5 +- src/lib/utils/BushCache.ts | 2 +- src/listeners/client/interactionCreate.ts | 2 +- src/listeners/client/ready.ts | 2 +- src/listeners/commands/commandBlocked.ts | 2 +- src/listeners/commands/commandCooldown.ts | 2 +- src/listeners/commands/commandError.ts | 4 +- .../commands/commandMissingPermissions.ts | 2 +- src/listeners/commands/commandStarted.ts | 2 +- src/listeners/commands/messageBlocked.ts | 2 +- src/listeners/commands/slashBlocked.ts | 4 +- src/listeners/commands/slashCommandError.ts | 4 +- src/listeners/commands/slashMissingPermissions.ts | 4 +- src/listeners/commands/slashNotFound.ts | 2 +- src/listeners/commands/slashStarted.ts | 2 +- src/listeners/custom/bushBan.ts | 2 +- src/listeners/custom/bushKick.ts | 2 +- src/listeners/custom/bushLevelUpdate.ts | 2 +- src/listeners/custom/bushMute.ts | 2 +- src/listeners/custom/bushPunishRole.ts | 2 +- src/listeners/custom/bushPunishRoleRemove.ts | 2 +- src/listeners/custom/bushPurge.ts | 2 +- src/listeners/custom/bushUnban.ts | 2 +- src/listeners/custom/bushUnmute.ts | 2 +- src/listeners/custom/bushUpdateModlog.ts | 2 +- src/listeners/custom/bushUpdateSettings.ts | 2 +- src/listeners/custom/bushWarn.ts | 2 +- src/listeners/guild/guildCreate.ts | 2 +- src/listeners/guild/guildDelete.ts | 2 +- src/listeners/guild/guildMemberAdd.ts | 2 +- src/listeners/guild/guildMemberRemove.ts | 2 +- src/listeners/guild/syncUnban.ts | 2 +- src/listeners/message/autoPublisher.ts | 2 +- src/listeners/message/autoThread.ts | 2 +- src/listeners/message/automodCreate.ts | 2 +- src/listeners/message/automodUpdate.ts | 2 +- src/listeners/message/blacklistedFile.ts | 2 +- src/listeners/message/boosterMessage.ts | 2 +- src/listeners/message/directMessage.ts | 2 +- src/listeners/message/level.ts | 2 +- src/listeners/message/verbose.ts | 2 +- src/listeners/other/consoleListener.ts | 4 +- src/listeners/other/exit.ts | 2 +- src/listeners/other/promiseRejection.ts | 4 +- src/listeners/other/uncaughtException.ts | 4 +- src/listeners/other/warning.ts | 4 +- src/tasks/cpuUsage.ts | 4 +- src/tasks/removeExpiredPunishements.ts | 4 +- src/tasks/updateCache.ts | 6 +- src/tasks/updateStats.ts | 4 +- src/tasks/updateSuperUsers.ts | 4 +- tsconfig.json | 29 ++-- yarn.lock | 118 +++++++--------- 228 files changed, 760 insertions(+), 719 deletions(-) delete mode 100644 src/arguments/roleWithDuation.ts create mode 100644 src/arguments/roleWithDuration.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 95ec3b3..1dd2bce 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,7 +7,8 @@ "**/.DS_Store": true, "dist": false, ".pnp.js": true, - "**/node_modules": true + "**/node_modules": true, + "**/dist/**/*.js.map": true }, "javascript.preferences.importModuleSpecifier": "project-relative", "typescript.preferences.importModuleSpecifier": "project-relative", diff --git a/package.json b/package.json index 65f2051..dea44ed 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "3.0.0", "description": "A multipurpose moderation bot developed for Moulberry's Bush.", "main": "dist/src/bot.js", - "type": "commonjs", + "type": "module", "repository": "https://github.com/NotEnoughUpdates/bush-bot-3.0", "author": "IRONM00N#0001 (@IRONM00N)", "contributors": [ @@ -15,17 +15,21 @@ "Zordlan#3560 (@Zordlan)" ], "license": "CC-BY-NC-SA-4.0", - "_moduleAliases": { - "@root": ".", - "@lib": "dist/src/lib" + "imports": { + "#root": { + "default/*": "./*" + }, + "#lib": { + "default": "./src/lib/index.js" + } }, "scripts": { - "build:esbuild": "yarn rimraf dist && yarn esbuild --sourcemap=inline --outdir=dist --platform=node --target=es2020 --format=cjs --log-level=warning src/**/*.ts", + "build:esbuild": "yarn rimraf dist && yarn esbuild --sourcemap=inline --outdir=dist --platform=node --target=es2020 --format=esm --log-level=warning src/**/*.ts", "build:tsc": "yarn rimraf dist && yarn tsc", "build:tsc:no-emit": "yarn rimraf dist && yarn tsc --noEmit", - "_start": "yarn build:esbuild && node --trace-warnings dist/src/bot.js", - "start": "yarn build:tsc && node --trace-warnings dist/src/bot.js", - "dev": "yarn build:tsc && node --trace-warnings dist/src/bot.js", + "_start": "yarn build:esbuild && node --experimental-json-modules --no-warnings dist/src/bot.js", + "start": "yarn build:tsc && node --experimental-json-modules --no-warnings dist/src/bot.js", + "dev": "yarn build:tsc && node --experimental-json-modules --no-warnings dist/src/bot.js", "test": "yarn lint && yarn tsc --noEmit", "format": "yarn prettier . --write", "lint": "yarn eslint --ext js,jsx,ts,tsx src", @@ -50,7 +54,6 @@ "humanize-duration": "^3.27.0", "lodash": "^4.17.21", "mathjs": "^9.5.0", - "module-alias": "^2.2.2", "moment": "^2.29.1", "nanoid": "^3.1.28", "node-os-utils": "^1.3.5", @@ -72,7 +75,6 @@ "@types/express": "^4.17.13", "@types/humanize-duration": "^3.25.1", "@types/lodash": "^4.14.176", - "@types/module-alias": "^2.0.1", "@types/node": "^16.11.6", "@types/node-os-utils": "^1.2.0", "@types/numeral": "^2.0.2", @@ -184,4 +186,4 @@ ] }, "packageManager": "yarn@3.1.0" -} \ No newline at end of file +} diff --git a/src/arguments/abbreviatedNumber.ts b/src/arguments/abbreviatedNumber.ts index a95b3e2..4dae2ff 100644 --- a/src/arguments/abbreviatedNumber.ts +++ b/src/arguments/abbreviatedNumber.ts @@ -1,4 +1,4 @@ -import { type BushArgumentTypeCaster } from '@lib'; +import { type BushArgumentTypeCaster } from '#lib'; import numeral from 'numeral'; export const abbreviatedNumberTypeCaster: BushArgumentTypeCaster = (_, phrase): number | null => { diff --git a/src/arguments/contentWithDuration.ts b/src/arguments/contentWithDuration.ts index 782cf76..9bebaef 100644 --- a/src/arguments/contentWithDuration.ts +++ b/src/arguments/contentWithDuration.ts @@ -1,4 +1,4 @@ -import { type BushArgumentTypeCaster } from '@lib'; +import { type BushArgumentTypeCaster } from '#lib'; export const contentWithDurationTypeCaster: BushArgumentTypeCaster = async ( _, diff --git a/src/arguments/discordEmoji.ts b/src/arguments/discordEmoji.ts index 551cf11..6fb971a 100644 --- a/src/arguments/discordEmoji.ts +++ b/src/arguments/discordEmoji.ts @@ -1,5 +1,5 @@ +import { type BushArgumentTypeCaster } from '#lib'; import { type Snowflake } from 'discord-api-types'; -import { type BushArgumentTypeCaster } from '../lib'; export const discordEmojiTypeCaster: BushArgumentTypeCaster = (_, phrase): { name: string; id: Snowflake } | null => { if (!phrase) return null; diff --git a/src/arguments/duration.ts b/src/arguments/duration.ts index f2da700..e369ddd 100644 --- a/src/arguments/duration.ts +++ b/src/arguments/duration.ts @@ -1,4 +1,4 @@ -import { type BushArgumentTypeCaster } from '@lib'; +import { type BushArgumentTypeCaster } from '#lib'; export const durationTypeCaster: BushArgumentTypeCaster = (_, phrase): number | null => { return client.util.parseDuration(phrase).duration; diff --git a/src/arguments/durationSeconds.ts b/src/arguments/durationSeconds.ts index 9882740..78be1ce 100644 --- a/src/arguments/durationSeconds.ts +++ b/src/arguments/durationSeconds.ts @@ -1,4 +1,4 @@ -import { type BushArgumentTypeCaster } from '@lib'; +import { type BushArgumentTypeCaster } from '#lib'; export const durationSecondsTypeCaster: BushArgumentTypeCaster = (_, phrase): number | null => { phrase += 's'; diff --git a/src/arguments/globalUser.ts b/src/arguments/globalUser.ts index 6a20260..344fe78 100644 --- a/src/arguments/globalUser.ts +++ b/src/arguments/globalUser.ts @@ -1,4 +1,4 @@ -import { BushUser, type BushArgumentTypeCaster } from '@lib'; +import { BushUser, type BushArgumentTypeCaster } from '#lib'; // resolve non-cached users export const globalUserTypeCaster: BushArgumentTypeCaster = async (_, phrase): Promise => { diff --git a/src/arguments/permission.ts b/src/arguments/permission.ts index 614a1c7..4f335dc 100644 --- a/src/arguments/permission.ts +++ b/src/arguments/permission.ts @@ -1,4 +1,4 @@ -import { type BushArgumentTypeCaster } from '@lib'; +import { type BushArgumentTypeCaster } from '#lib'; import { Permissions } from 'discord.js'; export const permissionTypeCaster: BushArgumentTypeCaster = (_, phrase) => { diff --git a/src/arguments/roleWithDuation.ts b/src/arguments/roleWithDuation.ts deleted file mode 100644 index c139d94..0000000 --- a/src/arguments/roleWithDuation.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { type BushArgumentTypeCaster } from '@lib'; - -export const roleWithDurationTypeCaster: BushArgumentTypeCaster = async ( - message, - phrase -): Promise<{ duration: number | null; role: string | null } | null> => { - // eslint-disable-next-line prefer-const - let { duration, contentWithoutTime } = client.util.parseDuration(phrase); - if (contentWithoutTime === null || contentWithoutTime === undefined) return null; - contentWithoutTime = contentWithoutTime.trim(); - const role = await util.arg.cast('role', message, contentWithoutTime); - if (!role) return null; - return { duration, role }; -}; diff --git a/src/arguments/roleWithDuration.ts b/src/arguments/roleWithDuration.ts new file mode 100644 index 0000000..455ad76 --- /dev/null +++ b/src/arguments/roleWithDuration.ts @@ -0,0 +1,14 @@ +import { type BushArgumentTypeCaster } from '#lib'; + +export const roleWithDurationTypeCaster: BushArgumentTypeCaster = async ( + message, + phrase +): Promise<{ duration: number | null; role: string | null } | null> => { + // eslint-disable-next-line prefer-const + let { duration, contentWithoutTime } = client.util.parseDuration(phrase); + if (contentWithoutTime === null || contentWithoutTime === undefined) return null; + contentWithoutTime = contentWithoutTime.trim(); + const role = await util.arg.cast('role', message, contentWithoutTime); + if (!role) return null; + return { duration, role }; +}; diff --git a/src/arguments/snowflake.ts b/src/arguments/snowflake.ts index 290dc5b..03d78c2 100644 --- a/src/arguments/snowflake.ts +++ b/src/arguments/snowflake.ts @@ -1,4 +1,4 @@ -import { type BushArgumentTypeCaster } from '@lib'; +import { type BushArgumentTypeCaster } from '#lib'; import { type Snowflake } from 'discord.js'; export const snowflakeTypeCaster: BushArgumentTypeCaster = (_, phrase): Snowflake | null => { diff --git a/src/bot.ts b/src/bot.ts index 6be90e7..c1d4c29 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -1,9 +1,11 @@ -import 'module-alias/register'; -import 'source-map-support/register'; -import config from './config/options'; -import { BushClient } from './lib'; -import { Sentry } from './lib/common/Sentry'; +import { dirname } from 'path'; +import 'source-map-support/register.js'; +import { fileURLToPath } from 'url'; +import config from './config/options.js'; +import { Sentry } from './lib/common/Sentry.js'; +import { BushClient } from './lib/index.js'; +const __dirname = dirname(fileURLToPath(import.meta.url)); global.__rootdir__ = __dirname || process.cwd(); new Sentry(); BushClient.init(); diff --git a/src/commands/_fake-command/ironmoon.ts b/src/commands/_fake-command/ironmoon.ts index dc34ab6..b13d1d3 100644 --- a/src/commands/_fake-command/ironmoon.ts +++ b/src/commands/_fake-command/ironmoon.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class IronmoonCommand extends BushCommand { public constructor() { diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts index 3b0b5f1..befa3ea 100644 --- a/src/commands/admin/channelPermissions.ts +++ b/src/commands/admin/channelPermissions.ts @@ -1,4 +1,4 @@ -import { BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed, type GuildMember, type PermissionString, type Role } from 'discord.js'; export default class ChannelPermissionsCommand extends BushCommand { diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts index a9db11d..3c6b629 100644 --- a/src/commands/admin/roleAll.ts +++ b/src/commands/admin/roleAll.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { type GuildMember, type Role } from 'discord.js'; export default class RoleAllCommand extends BushCommand { diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts index bac3ef3..f0173a4 100644 --- a/src/commands/config/blacklist.ts +++ b/src/commands/config/blacklist.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, Global, type BushMessage, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, Global, type BushMessage, type BushSlashMessage } from '#lib'; import { User, type Channel } from 'discord.js'; export default class BlacklistCommand extends BushCommand { diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index 555b47d..99a1147 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -1,19 +1,19 @@ -import { BushCommand, guildSettingsObj, settingsArr, type BushMessage, type BushSlashMessage, type GuildSettings } from '@lib'; +import { BushCommand, guildSettingsObj, settingsArr, type BushMessage, type BushSlashMessage, type GuildSettings } from '#lib'; import { type ArgumentOptions, type Flag } from 'discord-akairo'; import { - Channel, - Formatters, - GuildMember, - MessageActionRow, - MessageButton, - MessageEmbed, - MessageSelectMenu, - Role, - User, - type Message, - type MessageComponentInteraction, - type MessageOptions, - type Snowflake + Channel, + Formatters, + GuildMember, + MessageActionRow, + MessageButton, + MessageEmbed, + MessageSelectMenu, + Role, + User, + type Message, + type MessageComponentInteraction, + type MessageOptions, + type Snowflake } from 'discord.js'; import _ from 'lodash'; diff --git a/src/commands/config/customAutomodPhrases.ts b/src/commands/config/customAutomodPhrases.ts index 25201ff..9fbebf5 100644 --- a/src/commands/config/customAutomodPhrases.ts +++ b/src/commands/config/customAutomodPhrases.ts @@ -1,4 +1,4 @@ -// import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +// import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; // export default class CustomAutomodPhrasesCommand extends BushCommand { // public constructor() { diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts index 3ada74e..a04850c 100644 --- a/src/commands/config/disable.ts +++ b/src/commands/config/disable.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, Global, type BushMessage, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, Global, type BushMessage, type BushSlashMessage } from '#lib'; export default class DisableCommand extends BushCommand { public constructor() { diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts index 065253c..7f9ffc9 100644 --- a/src/commands/config/features.ts +++ b/src/commands/config/features.ts @@ -1,4 +1,10 @@ -import { BushCommand, guildFeaturesArr, guildFeaturesObj, type BushMessage, type BushSlashMessage, type GuildFeatures } from '@lib'; +import { + BushCommand, + guildFeaturesArr, guildFeaturesObj, + type BushMessage, + type BushSlashMessage, + type GuildFeatures +} from '#lib'; import { MessageActionRow, MessageEmbed, MessageSelectMenu, type Message, type SelectMenuInteraction } from 'discord.js'; export default class FeaturesCommand extends BushCommand { diff --git a/src/commands/config/levelRoles.ts b/src/commands/config/levelRoles.ts index e788615..e7b4505 100644 --- a/src/commands/config/levelRoles.ts +++ b/src/commands/config/levelRoles.ts @@ -1,4 +1,4 @@ -// import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +// import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; // export default class LevelRolesCommand extends BushCommand { // public constructor() { diff --git a/src/commands/config/log.ts b/src/commands/config/log.ts index af68483..cccef8c 100644 --- a/src/commands/config/log.ts +++ b/src/commands/config/log.ts @@ -1,4 +1,4 @@ -import { BushCommand, guildLogsArr, type BushMessage, type BushSlashMessage, type GuildLogType } from '@lib'; +import { BushCommand, guildLogsArr, type BushMessage, type BushSlashMessage, type GuildLogType } from '#lib'; import { type ArgumentOptions, type Flag } from 'discord-akairo'; import { type TextChannel } from 'discord.js'; diff --git a/src/commands/dev/__template.ts b/src/commands/dev/__template.ts index 85cc06e..fe685ff 100644 --- a/src/commands/dev/__template.ts +++ b/src/commands/dev/__template.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class TemplateCommand extends BushCommand { public constructor() { diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts index e22f937..b82534c 100644 --- a/src/commands/dev/eval.ts +++ b/src/commands/dev/eval.ts @@ -1,9 +1,11 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { exec } from 'child_process'; import { MessageEmbed as _MessageEmbed } from 'discord.js'; -import { transpile } from 'typescript'; +import ts from 'typescript'; import { promisify } from 'util'; +const { transpile } = ts; + export default class EvalCommand extends BushCommand { public constructor() { super('eval', { @@ -98,7 +100,7 @@ export default class EvalCommand extends BushCommand { roles = message.guild?.roles, emojis = util.emojis, colors = util.colors, - { ActivePunishment, Global, Guild, Level, ModLog, StickyRole } = await import('@lib'), + { ActivePunishment, Global, Guild, Level, ModLog, StickyRole } = await import('#lib'), { ButtonInteraction, Collection, diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts index 7920a37..cbabb48 100644 --- a/src/commands/dev/reload.ts +++ b/src/commands/dev/reload.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class ReloadCommand extends BushCommand { public constructor() { diff --git a/src/commands/dev/say.ts b/src/commands/dev/say.ts index 3a8b2de..400a132 100644 --- a/src/commands/dev/say.ts +++ b/src/commands/dev/say.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class SayCommand extends BushCommand { public constructor() { diff --git a/src/commands/dev/servers.ts b/src/commands/dev/servers.ts index 4b98ed9..e8a2fe4 100644 --- a/src/commands/dev/servers.ts +++ b/src/commands/dev/servers.ts @@ -1,4 +1,4 @@ -import { BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '#lib'; import { type Guild, type MessageEmbedOptions } from 'discord.js'; export default class ServersCommand extends BushCommand { diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts index e32408d..83432f4 100644 --- a/src/commands/dev/sh.ts +++ b/src/commands/dev/sh.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import chalk from 'chalk'; import { exec } from 'child_process'; import { MessageEmbed, Util } from 'discord.js'; diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts index 41cd7eb..17d81ac 100644 --- a/src/commands/dev/superUser.ts +++ b/src/commands/dev/superUser.ts @@ -1,4 +1,4 @@ -import { BushCommand, Global, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, Global, type BushMessage, type BushSlashMessage } from '#lib'; import { type ArgumentOptions, type Flag } from 'discord-akairo'; import { type User } from 'discord.js'; diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts index d6c20f7..d4109f4 100644 --- a/src/commands/dev/test.ts +++ b/src/commands/dev/test.ts @@ -1,11 +1,11 @@ -import { BushCommand, ButtonPaginator, type BushMessage } from '@lib'; +import { BushCommand, ButtonPaginator, type BushMessage } from '#lib'; import { - Constants as jsConstants, - MessageActionRow, - MessageButton, - MessageEmbed, - type ApplicationCommand, - type Collection + Constants as jsConstants, + MessageActionRow, + MessageButton, + MessageEmbed, + type ApplicationCommand, + type Collection } from 'discord.js'; export default class TestCommand extends BushCommand { diff --git a/src/commands/fun/coinflip.ts b/src/commands/fun/coinflip.ts index ef55518..83de5ba 100644 --- a/src/commands/fun/coinflip.ts +++ b/src/commands/fun/coinflip.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class CoinFlipCommand extends BushCommand { public constructor() { diff --git a/src/commands/fun/dice.ts b/src/commands/fun/dice.ts index fef5c7a..74f387e 100644 --- a/src/commands/fun/dice.ts +++ b/src/commands/fun/dice.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class EightBallCommand extends BushCommand { public constructor() { diff --git a/src/commands/fun/eightBall.ts b/src/commands/fun/eightBall.ts index 2555fdb..fc662ad 100644 --- a/src/commands/fun/eightBall.ts +++ b/src/commands/fun/eightBall.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class EightBallCommand extends BushCommand { public constructor() { diff --git a/src/commands/fun/minesweeper.ts b/src/commands/fun/minesweeper.ts index 6c6d4f4..71c5055 100644 --- a/src/commands/fun/minesweeper.ts +++ b/src/commands/fun/minesweeper.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import Minesweeper from 'discord.js-minesweeper'; export default class MinesweeperCommand extends BushCommand { diff --git a/src/commands/info/avatar.ts b/src/commands/info/avatar.ts index 10994d9..e8b213f 100644 --- a/src/commands/info/avatar.ts +++ b/src/commands/info/avatar.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { GuildMember, MessageEmbed, type User } from 'discord.js'; export default class AvatarCommand extends BushCommand { diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts index d5f37e8..f100317 100644 --- a/src/commands/info/botInfo.ts +++ b/src/commands/info/botInfo.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed, version as discordJSVersion } from 'discord.js'; import * as os from 'os'; import prettyBytes from 'pretty-bytes'; diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts index 5c3f14c..8fed7da 100644 --- a/src/commands/info/color.ts +++ b/src/commands/info/color.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushGuildMember, type BushMessage, type BushRole, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushGuildMember, type BushMessage, type BushRole, type BushSlashMessage } from '#lib'; import { Argument } from 'discord-akairo'; import { MessageEmbed, Role, type Message } from 'discord.js'; import tinycolor from 'tinycolor2'; diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts index 3c287dd..facbb45 100644 --- a/src/commands/info/guildInfo.ts +++ b/src/commands/info/guildInfo.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { Guild, MessageEmbed, type BaseGuildVoiceChannel, type GuildPreview, type Snowflake, type Vanity } from 'discord.js'; export default class GuildInfoCommand extends BushCommand { diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index e22aa5d..f956405 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, BushMessage, BushSlashMessage } from '#lib'; import { MessageActionRow, MessageButton, MessageEmbed } from 'discord.js'; import packageDotJSON from '../../../package.json'; diff --git a/src/commands/info/icon.ts b/src/commands/info/icon.ts index b9cc4e0..fa4968c 100644 --- a/src/commands/info/icon.ts +++ b/src/commands/info/icon.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; export default class IconCommand extends BushCommand { diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts index d4bcff0..935dca0 100644 --- a/src/commands/info/links.ts +++ b/src/commands/info/links.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageActionRow, MessageButton } from 'discord.js'; import packageDotJSON from '../../../package.json'; diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts index 831eeb7..1d3f75a 100644 --- a/src/commands/info/ping.ts +++ b/src/commands/info/ping.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed, type Message } from 'discord.js'; export default class PingCommand extends BushCommand { diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts index 390d1bb..db1a3a4 100644 --- a/src/commands/info/pronouns.ts +++ b/src/commands/info/pronouns.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed, type User } from 'discord.js'; export default class PronounsCommand extends BushCommand { diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts index 2b3c816..a6de675 100644 --- a/src/commands/info/snowflake.ts +++ b/src/commands/info/snowflake.ts @@ -1,20 +1,20 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { - MessageEmbed, - SnowflakeUtil, - VoiceChannel, - type CategoryChannel, - type Channel, - type DeconstructedSnowflake, - type DMChannel, - type Emoji, - type Guild, - type NewsChannel, - type Role, - type Snowflake, - type StageChannel, - type TextChannel, - type User + MessageEmbed, + SnowflakeUtil, + VoiceChannel, + type CategoryChannel, + type Channel, + type DeconstructedSnowflake, + type DMChannel, + type Emoji, + type Guild, + type NewsChannel, + type Role, + type Snowflake, + type StageChannel, + type TextChannel, + type User } from 'discord.js'; export default class SnowflakeCommand extends BushCommand { diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index fe4fd85..3afdff2 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage, type BushUser } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage, type BushUser } from '#lib'; import { MessageEmbed, type Snowflake } from 'discord.js'; // TODO: Add bot information diff --git a/src/commands/leveling/leaderboard.ts b/src/commands/leveling/leaderboard.ts index baede6c..19387f9 100644 --- a/src/commands/leveling/leaderboard.ts +++ b/src/commands/leveling/leaderboard.ts @@ -1,4 +1,4 @@ -import { BushCommand, ButtonPaginator, Level, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, ButtonPaginator, Level, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; export default class LeaderboardCommand extends BushCommand { diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts index 9f2e6bb..0da0bf0 100644 --- a/src/commands/leveling/level.ts +++ b/src/commands/leveling/level.ts @@ -1,7 +1,16 @@ -import { AllowedMentions, BushCommand, CanvasProgressBar, Level, type BushGuild, type BushMessage, type BushSlashMessage, type BushUser } from '@lib'; +import { + AllowedMentions, + BushCommand, + CanvasProgressBar, + Level, + type BushGuild, + type BushMessage, + type BushSlashMessage, + type BushUser +} from '#lib'; import canvas from 'canvas'; import { MessageAttachment } from 'discord.js'; -import got from 'got/dist/source'; +import got from 'got'; import { join } from 'path'; import SimplifyNumber from 'simplify-number'; diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts index 9e73308..499463a 100644 --- a/src/commands/leveling/setLevel.ts +++ b/src/commands/leveling/setLevel.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, Level, type BushMessage, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, Level, type BushMessage, type BushSlashMessage } from '#lib'; import { type User } from 'discord.js'; export default class SetLevelCommand extends BushCommand { diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts index a00bfc9..2f2a6fa 100644 --- a/src/commands/leveling/setXp.ts +++ b/src/commands/leveling/setXp.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, Level, type BushMessage, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, Level, type BushMessage, type BushSlashMessage } from '#lib'; import { type User } from 'discord.js'; export default class SetXpCommand extends BushCommand { diff --git a/src/commands/moderation/_lockdown.ts b/src/commands/moderation/_lockdown.ts index e71bd80..029db29 100644 --- a/src/commands/moderation/_lockdown.ts +++ b/src/commands/moderation/_lockdown.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushNewsChannel, type BushSlashMessage, type BushTextChannel } from '@lib'; +import { BushCommand, type BushMessage, type BushNewsChannel, type BushSlashMessage, type BushTextChannel } from '#lib'; export default class LockdownCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index 660235f..7c0d010 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, Moderation, type BushMessage, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, Moderation, type BushMessage, type BushSlashMessage } from '#lib'; import { type Snowflake, type User } from 'discord.js'; export default class BanCommand extends BushCommand { diff --git a/src/commands/moderation/evidence.ts b/src/commands/moderation/evidence.ts index a2fa40b..0204d84 100644 --- a/src/commands/moderation/evidence.ts +++ b/src/commands/moderation/evidence.ts @@ -1,4 +1,4 @@ -import { BushCommand, ModLog, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, ModLog, type BushMessage, type BushSlashMessage } from '#lib'; import { type ArgumentOptions, type Flag } from 'discord-akairo'; export default class EvidenceCommand extends BushCommand { diff --git a/src/commands/moderation/hideCase.ts b/src/commands/moderation/hideCase.ts index 44170a9..9c22e63 100644 --- a/src/commands/moderation/hideCase.ts +++ b/src/commands/moderation/hideCase.ts @@ -1,4 +1,4 @@ -import { BushCommand, ModLog, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, ModLog, type BushMessage, type BushSlashMessage } from '#lib'; export default class HideCaseCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index 858a392..1f1c2fb 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, Moderation, type BushMessage, type BushSlashMessage, type BushUser } from '@lib'; +import { AllowedMentions, BushCommand, Moderation, type BushMessage, type BushSlashMessage, type BushUser } from '#lib'; export default class KickCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index 35ac6f6..8bdee59 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -1,4 +1,4 @@ -import { BushCommand, ButtonPaginator, ModLog, type BushMessage, type BushSlashMessage, type BushUser } from '@lib'; +import { BushCommand, ButtonPaginator, ModLog, type BushMessage, type BushSlashMessage, type BushUser } from '#lib'; import { MessageEmbed, User } from 'discord.js'; export default class ModlogCommand extends BushCommand { diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 9938d3f..44e1db4 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, Moderation, type BushMessage, type BushSlashMessage, type BushUser } from '@lib'; +import { AllowedMentions, BushCommand, Moderation, type BushMessage, type BushSlashMessage, type BushUser } from '#lib'; export default class MuteCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/purge.ts b/src/commands/moderation/purge.ts index ef2b0b5..4d8db08 100644 --- a/src/commands/moderation/purge.ts +++ b/src/commands/moderation/purge.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage } from '@lib'; +import { BushCommand, BushMessage } from '#lib'; import { Collection, type Snowflake } from 'discord.js'; export default class PurgeCommand extends BushCommand { diff --git a/src/commands/moderation/removeReactionEmoji.ts b/src/commands/moderation/removeReactionEmoji.ts index 1645b46..80f2c01 100644 --- a/src/commands/moderation/removeReactionEmoji.ts +++ b/src/commands/moderation/removeReactionEmoji.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage } from '@lib'; +import { BushCommand, type BushMessage } from '#lib'; import { type Emoji, type Snowflake } from 'discord.js'; export default class RemoveReactionEmojiCommand extends BushCommand { diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index 73901e5..dd74bb4 100644 --- a/src/commands/moderation/role.ts +++ b/src/commands/moderation/role.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushGuildMember, type BushMessage, type BushRole, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushGuildMember, type BushMessage, type BushRole, type BushSlashMessage } from '#lib'; import { type ArgumentOptions, type Flag } from 'discord-akairo'; export default class RoleCommand extends BushCommand { diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts index 40b5ed1..5b77096 100644 --- a/src/commands/moderation/slowmode.ts +++ b/src/commands/moderation/slowmode.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushNewsChannel, type BushSlashMessage, type BushTextChannel, type BushThreadChannel } from '@lib'; +import { BushCommand, type BushMessage, type BushNewsChannel, type BushSlashMessage, type BushTextChannel, type BushThreadChannel } from '#lib'; import { Argument } from 'discord-akairo'; import { TextChannel, ThreadChannel, type NewsChannel } from 'discord.js'; diff --git a/src/commands/moderation/unban.ts b/src/commands/moderation/unban.ts index ec610d9..1492b63 100644 --- a/src/commands/moderation/unban.ts +++ b/src/commands/moderation/unban.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage, type BushUser } from '@lib'; +import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage, type BushUser } from '#lib'; export default class UnbanCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/unmute.ts b/src/commands/moderation/unmute.ts index f0e0899..e1bda63 100644 --- a/src/commands/moderation/unmute.ts +++ b/src/commands/moderation/unmute.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, Moderation, type BushGuildMember, type BushMessage, type BushSlashMessage, type BushUser } from '@lib'; +import { AllowedMentions, BushCommand, Moderation, type BushGuildMember, type BushMessage, type BushSlashMessage, type BushUser } from '#lib'; export default class UnmuteCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts index a050351..25b47ec 100644 --- a/src/commands/moderation/warn.ts +++ b/src/commands/moderation/warn.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, Moderation, type BushGuildMember, type BushMessage, type BushSlashMessage, type BushUser } from '@lib'; +import { AllowedMentions, BushCommand, Moderation, type BushGuildMember, type BushMessage, type BushSlashMessage, type BushUser } from '#lib'; export default class WarnCommand extends BushCommand { public constructor() { diff --git a/src/commands/moulberry-bush/capePerms.ts b/src/commands/moulberry-bush/capePerms.ts index 703f32e..237ca89 100644 --- a/src/commands/moulberry-bush/capePerms.ts +++ b/src/commands/moulberry-bush/capePerms.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; import got from 'got'; diff --git a/src/commands/moulberry-bush/capes.ts b/src/commands/moulberry-bush/capes.ts index fab70df..0af0125 100644 --- a/src/commands/moulberry-bush/capes.ts +++ b/src/commands/moulberry-bush/capes.ts @@ -1,4 +1,4 @@ -import { BushCommand, ButtonPaginator, DeleteButton, type BushMessage } from '@lib'; +import { BushCommand, ButtonPaginator, DeleteButton, type BushMessage } from '#lib'; import { type MessageEmbedOptions } from 'discord.js'; import got from 'got'; diff --git a/src/commands/moulberry-bush/giveawayPing.ts b/src/commands/moulberry-bush/giveawayPing.ts index 54a31e7..d76964c 100644 --- a/src/commands/moulberry-bush/giveawayPing.ts +++ b/src/commands/moulberry-bush/giveawayPing.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushMessage } from '#lib'; export default class GiveawayPingCommand extends BushCommand { public constructor() { diff --git a/src/commands/moulberry-bush/moulHammer.ts b/src/commands/moulberry-bush/moulHammer.ts index 2c10bd4..98ef78f 100644 --- a/src/commands/moulberry-bush/moulHammer.ts +++ b/src/commands/moulberry-bush/moulHammer.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage } from '@lib'; +import { BushCommand, type BushMessage } from '#lib'; import { MessageEmbed, type User } from 'discord.js'; export default class MoulHammerCommand extends BushCommand { diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts index 9a69c4a..2888051 100644 --- a/src/commands/moulberry-bush/report.ts +++ b/src/commands/moulberry-bush/report.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushMessage } from '#lib'; import { MessageEmbed, type GuildMember } from 'discord.js'; import moment from 'moment'; diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts index 6beb6b4..fb322ff 100644 --- a/src/commands/moulberry-bush/rule.ts +++ b/src/commands/moulberry-bush/rule.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushMessage } from '#lib'; import { MessageEmbed, type User } from 'discord.js'; const rules = [ diff --git a/src/commands/moulberry-bush/serverStatus.ts b/src/commands/moulberry-bush/serverStatus.ts index 17f1090..ff0023e 100644 --- a/src/commands/moulberry-bush/serverStatus.ts +++ b/src/commands/moulberry-bush/serverStatus.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage } from '@lib'; +import { BushCommand, type BushMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; import got from 'got'; diff --git a/src/commands/utilities/activity.ts b/src/commands/utilities/activity.ts index 91d6328..3fca2b6 100644 --- a/src/commands/utilities/activity.ts +++ b/src/commands/utilities/activity.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { DiscordAPIError, Message, VoiceChannel } from 'discord.js'; const activityMap = { diff --git a/src/commands/utilities/calculator.ts b/src/commands/utilities/calculator.ts index 1df4264..277947b 100644 --- a/src/commands/utilities/calculator.ts +++ b/src/commands/utilities/calculator.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; import { evaluate } from 'mathjs'; diff --git a/src/commands/utilities/decode.ts b/src/commands/utilities/decode.ts index 5ecd6f1..7f0c7d4 100644 --- a/src/commands/utilities/decode.ts +++ b/src/commands/utilities/decode.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushMessage } from '#lib'; import { type AkairoMessage } from 'discord-akairo'; import { MessageEmbed } from 'discord.js'; diff --git a/src/commands/utilities/hash.ts b/src/commands/utilities/hash.ts index 5b3bcfb..62791c9 100644 --- a/src/commands/utilities/hash.ts +++ b/src/commands/utilities/hash.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage } from '@lib'; +import { BushCommand, type BushMessage } from '#lib'; import crypto from 'crypto'; import got from 'got'; diff --git a/src/commands/utilities/price.ts b/src/commands/utilities/price.ts index 333bfea..b852a53 100644 --- a/src/commands/utilities/price.ts +++ b/src/commands/utilities/price.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage } from '@lib'; +import { BushCommand, type BushMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; import Fuse from 'fuse.js'; import got from 'got'; diff --git a/src/commands/utilities/steal.ts b/src/commands/utilities/steal.ts index 4ee7fb1..3d230c5 100644 --- a/src/commands/utilities/steal.ts +++ b/src/commands/utilities/steal.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage } from '@lib'; +import { BushCommand, type BushMessage } from '#lib'; import { type Snowflake } from 'discord.js'; export default class StealCommand extends BushCommand { diff --git a/src/commands/utilities/suicide.ts b/src/commands/utilities/suicide.ts index 8050dcb..beb7309 100644 --- a/src/commands/utilities/suicide.ts +++ b/src/commands/utilities/suicide.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; export default class TemplateCommand extends BushCommand { diff --git a/src/commands/utilities/uuid.ts b/src/commands/utilities/uuid.ts index 64e5b56..556a4de 100644 --- a/src/commands/utilities/uuid.ts +++ b/src/commands/utilities/uuid.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage } from '@lib'; +import { BushCommand, type BushMessage } from '#lib'; export default class UuidCommand extends BushCommand { public constructor() { diff --git a/src/commands/utilities/viewRaw.ts b/src/commands/utilities/viewRaw.ts index 45939b0..4719da1 100644 --- a/src/commands/utilities/viewRaw.ts +++ b/src/commands/utilities/viewRaw.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed, type DMChannel, type NewsChannel, type Snowflake, type TextChannel } from 'discord.js'; export default class ViewRawCommand extends BushCommand { diff --git a/src/commands/utilities/whoHasRole.ts b/src/commands/utilities/whoHasRole.ts index 69285d8..a457756 100644 --- a/src/commands/utilities/whoHasRole.ts +++ b/src/commands/utilities/whoHasRole.ts @@ -1,4 +1,4 @@ -import { BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '#lib'; import { Util, type CommandInteraction, type Role } from 'discord.js'; export default class WhoHasRoleCommand extends BushCommand { diff --git a/src/commands/utilities/wolframAlpha.ts b/src/commands/utilities/wolframAlpha.ts index a2b4036..bc5f939 100644 --- a/src/commands/utilities/wolframAlpha.ts +++ b/src/commands/utilities/wolframAlpha.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed, type MessageOptions } from 'discord.js'; import WolframAlphaAPI from 'wolfram-alpha-api'; diff --git a/src/config/example-options.ts b/src/config/example-options.ts index aafda05..21c99ad 100644 --- a/src/config/example-options.ts +++ b/src/config/example-options.ts @@ -1,4 +1,4 @@ -import { Config } from '@lib'; +import { Config } from '#lib'; export default new Config({ credentials: { diff --git a/src/context-menu-commands/message/viewRaw.ts b/src/context-menu-commands/message/viewRaw.ts index 4af6fa1..2d718dc 100644 --- a/src/context-menu-commands/message/viewRaw.ts +++ b/src/context-menu-commands/message/viewRaw.ts @@ -1,7 +1,7 @@ -import { type BushMessage } from '@lib'; +import { type BushMessage } from '#lib'; import { ContextMenuCommand } from 'discord-akairo'; import { type ContextMenuInteraction } from 'discord.js'; -import ViewRawCommand from '../../commands/utilities/viewRaw'; +import ViewRawCommand from '../../commands/utilities/viewRaw.js'; export default class ViewRawContextMenuCommand extends ContextMenuCommand { public constructor() { diff --git a/src/inhibitors/blacklist/channelGlobalBlacklist.ts b/src/inhibitors/blacklist/channelGlobalBlacklist.ts index c2aad0e..019b778 100644 --- a/src/inhibitors/blacklist/channelGlobalBlacklist.ts +++ b/src/inhibitors/blacklist/channelGlobalBlacklist.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, type BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushInhibitor, type BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class UserGlobalBlacklistInhibitor extends BushInhibitor { public constructor() { diff --git a/src/inhibitors/blacklist/channelGuildBlacklist.ts b/src/inhibitors/blacklist/channelGuildBlacklist.ts index 6725068..60bf452 100644 --- a/src/inhibitors/blacklist/channelGuildBlacklist.ts +++ b/src/inhibitors/blacklist/channelGuildBlacklist.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, type BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushInhibitor, type BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class ChannelGuildBlacklistInhibitor extends BushInhibitor { public constructor() { diff --git a/src/inhibitors/blacklist/guildBlacklist.ts b/src/inhibitors/blacklist/guildBlacklist.ts index f3ae7c7..be7ac22 100644 --- a/src/inhibitors/blacklist/guildBlacklist.ts +++ b/src/inhibitors/blacklist/guildBlacklist.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushInhibitor, type BushMessage, type BushSlashMessage } from '#lib'; export default class GuildBlacklistInhibitor extends BushInhibitor { public constructor() { diff --git a/src/inhibitors/blacklist/userGlobalBlacklist.ts b/src/inhibitors/blacklist/userGlobalBlacklist.ts index 8b5d00c..36d4b44 100644 --- a/src/inhibitors/blacklist/userGlobalBlacklist.ts +++ b/src/inhibitors/blacklist/userGlobalBlacklist.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushInhibitor, type BushMessage, type BushSlashMessage } from '#lib'; export default class UserGlobalBlacklistInhibitor extends BushInhibitor { public constructor() { diff --git a/src/inhibitors/blacklist/userGuildBlacklist.ts b/src/inhibitors/blacklist/userGuildBlacklist.ts index ed87cf8..dc299c3 100644 --- a/src/inhibitors/blacklist/userGuildBlacklist.ts +++ b/src/inhibitors/blacklist/userGuildBlacklist.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushInhibitor, type BushMessage, type BushSlashMessage } from '#lib'; export default class UserGuildBlacklistInhibitor extends BushInhibitor { public constructor() { diff --git a/src/inhibitors/checks/fatal.ts b/src/inhibitors/checks/fatal.ts index 01ff78c..1913fb6 100644 --- a/src/inhibitors/checks/fatal.ts +++ b/src/inhibitors/checks/fatal.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushInhibitor, type BushMessage, type BushSlashMessage } from '#lib'; export default class FatalInhibitor extends BushInhibitor { public constructor() { diff --git a/src/inhibitors/checks/guildUnavailable.ts b/src/inhibitors/checks/guildUnavailable.ts index ad70e4b..2ac491d 100644 --- a/src/inhibitors/checks/guildUnavailable.ts +++ b/src/inhibitors/checks/guildUnavailable.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushInhibitor, type BushMessage, type BushSlashMessage } from '#lib'; export default class GuildUnavailableInhibitor extends BushInhibitor { public constructor() { diff --git a/src/inhibitors/command/dm.ts b/src/inhibitors/command/dm.ts index 5e1f32d..c52425e 100644 --- a/src/inhibitors/command/dm.ts +++ b/src/inhibitors/command/dm.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, type BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushInhibitor, type BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class DMInhibitor extends BushInhibitor { public constructor() { diff --git a/src/inhibitors/command/globalDisabledCommand.ts b/src/inhibitors/command/globalDisabledCommand.ts index 09fc54a..80c1735 100644 --- a/src/inhibitors/command/globalDisabledCommand.ts +++ b/src/inhibitors/command/globalDisabledCommand.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, type BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushInhibitor, type BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class DisabledGuildCommandInhibitor extends BushInhibitor { public constructor() { diff --git a/src/inhibitors/command/guild.ts b/src/inhibitors/command/guild.ts index a0d3da1..d5f4f17 100644 --- a/src/inhibitors/command/guild.ts +++ b/src/inhibitors/command/guild.ts @@ -1,4 +1,4 @@ -import { BushInhibitor, type BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { BushInhibitor, type BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; export default class GuildInhibitor extends BushInhibitor { public constructor() { diff --git a/src/inhibitors/command/guildDisable