diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 964d8167..f4e58baf 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -33,7 +33,7 @@ jobs: - uses: actions/setup-node@v6 with: - node-version: 24.x + node-version: 25.x cache: npm - run: npm ci diff --git a/package-lock.json b/package-lock.json index ed30f24a..91b26272 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ "lefthook": "^2.1.1" }, "engines": { - "node": ">=25.6.0" + "node": ">=25.6.1" } }, "node_modules/@acemir/cssom": { diff --git a/package.json b/package.json index 65a190eb..00a70970 100644 --- a/package.json +++ b/package.json @@ -59,13 +59,13 @@ "imports": { "#log": "./src/utils/logger.ts", "#db": "./src/storage/db/db.ts", - "#*": "./src/*" + "#/*": "./src/*" }, "trustedDependencies": [ "@biomejs/biome", "lefthook" ], "engines": { - "node": ">=25.6.0" + "node": ">=25.6.1" } } diff --git a/src/app.ts b/src/app.ts index 0ef72a75..8296ebad 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,38 +1,38 @@ import { GatewayIntentBits, Partials, Client } from "discord.js"; import * as sentry from "@sentry/node"; -import { readConfig, databasePath, args } from "#service/config.ts"; +import { readConfig, databasePath, args } from "#/service/config.ts"; import log from "#log"; import { Temporal } from "@js-temporal/polyfill"; -import "#polyfills.ts"; +import "#/polyfills.ts"; -import * as kysely from "#storage/db/db.ts"; +import * as kysely from "#/storage/db/db.ts"; -import type { ReactionHandler } from "#handler/ReactionHandler.ts"; -import messageDeleteHandler from "#handler/messageDeleteHandler.ts"; -import { woisVoteReactionHandler } from "#commands/woisvote.ts"; -import * as voiceStateService from "#service/voiceState.ts"; +import type { ReactionHandler } from "#/handler/ReactionHandler.ts"; +import messageDeleteHandler from "#/handler/messageDeleteHandler.ts"; +import { woisVoteReactionHandler } from "#/commands/woisvote.ts"; +import * as voiceStateService from "#/service/voiceState.ts"; -import roleAssignerHandler from "#handler/reaction/roleAssignerHandler.ts"; -import pollReactionHandler from "#handler/reaction/pollReactionHandler.ts"; -import logEmotesReactionHandler from "#handler/reaction/logEmotesReactionHandler.ts"; -import quoteReactionHandler from "#handler/reaction/quoteHandler.ts"; +import roleAssignerHandler from "#/handler/reaction/roleAssignerHandler.ts"; +import pollReactionHandler from "#/handler/reaction/pollReactionHandler.ts"; +import logEmotesReactionHandler from "#/handler/reaction/logEmotesReactionHandler.ts"; +import quoteReactionHandler from "#/handler/reaction/quoteHandler.ts"; import { handleInteractionEvent, loadCommands, messageCommandHandler, registerAllApplicationCommandsAsGuildCommands, -} from "#handler/commandHandler.ts"; -import * as guildMemberHandler from "#handler/guildMemberHandler.ts"; -import deleteThreadMessagesHandler from "#handler/messageCreate/deleteThreadMessagesHandler.ts"; -import { handlePresenceUpdate } from "#handler/presenceHandler.ts"; -import { createBotContext, type BotContext } from "#context.ts"; -import { ehreReactionHandler } from "#commands/ehre.ts"; -import * as terminal from "#utils/terminal.ts"; -import * as dateUtils from "#utils/dateUtils.ts"; -import * as cronService from "#service/cron.ts"; +} from "#/handler/commandHandler.ts"; +import * as guildMemberHandler from "#/handler/guildMemberHandler.ts"; +import deleteThreadMessagesHandler from "#/handler/messageCreate/deleteThreadMessagesHandler.ts"; +import { handlePresenceUpdate } from "#/handler/presenceHandler.ts"; +import { createBotContext, type BotContext } from "#/context.ts"; +import { ehreReactionHandler } from "#/commands/ehre.ts"; +import * as terminal from "#/utils/terminal.ts"; +import * as dateUtils from "#/utils/dateUtils.ts"; +import * as cronService from "#/service/cron.ts"; const env = process.env; diff --git a/src/commands/aoc.ts b/src/commands/aoc.ts index 246a18b7..64a0e46e 100644 --- a/src/commands/aoc.ts +++ b/src/commands/aoc.ts @@ -8,8 +8,8 @@ import { } from "discord.js"; import type * as discord from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { ApplicationCommand } from "#commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; import log from "#log"; diff --git a/src/commands/autoEhre.ts b/src/commands/autoEhre.ts index 0d346cbb..a2eff84e 100644 --- a/src/commands/autoEhre.ts +++ b/src/commands/autoEhre.ts @@ -1,7 +1,7 @@ -import type { ProcessableMessage } from "#service/command.ts"; -import type { SpecialCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; -import * as ehreService from "#service/ehre.ts"; +import * as ehreService from "#/service/ehre.ts"; export default class AutoEhreCommand implements SpecialCommand { name = "AutoEhre"; diff --git a/src/commands/banlist.ts b/src/commands/banlist.ts index 847c6ab5..b12b1d25 100644 --- a/src/commands/banlist.ts +++ b/src/commands/banlist.ts @@ -6,11 +6,11 @@ import { time, } from "discord.js"; -import type { ApplicationCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { Ban } from "#storage/db/model.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { Ban } from "#/storage/db/model.ts"; -import * as banService from "#service/ban.ts"; +import * as banService from "#/service/ban.ts"; import log from "#log"; export default class BanListCommand implements ApplicationCommand { diff --git a/src/commands/bonk.ts b/src/commands/bonk.ts index 635fa5a3..014c0454 100644 --- a/src/commands/bonk.ts +++ b/src/commands/bonk.ts @@ -3,8 +3,8 @@ import * as fs from "node:fs/promises"; import { createCanvas, loadImage } from "@napi-rs/canvas"; import type { GuildMember } from "discord.js"; -import type { MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; import log from "#log"; const createBonkMeme = async (author: GuildMember): Promise => { diff --git a/src/commands/boobs.ts b/src/commands/boobs.ts index f10ea9c2..1f13485d 100644 --- a/src/commands/boobs.ts +++ b/src/commands/boobs.ts @@ -1,11 +1,11 @@ import { time, TimestampStyles, type User } from "discord.js"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { MessageCommand } from "#commands/command.ts"; -import type { Boob } from "#storage/db/model.ts"; -import * as boob from "#storage/boob.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { Boob } from "#/storage/db/model.ts"; +import * as boob from "#/storage/boob.ts"; import log from "#log"; -import { randomEntry } from "#service/random.ts"; +import { randomEntry } from "#/service/random.ts"; interface Booba { description: string; diff --git a/src/commands/clap.ts b/src/commands/clap.ts index 4c82b02b..6f61a6c6 100644 --- a/src/commands/clap.ts +++ b/src/commands/clap.ts @@ -8,9 +8,9 @@ import { SlashCommandStringOption, } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { ApplicationCommand, MessageCommand } from "#/commands/command.ts"; const clapify = (str: string): string => `${str.split(/\s+/).join(" :clap: ")} :clap:`; diff --git a/src/commands/command.ts b/src/commands/command.ts index 0f94f4c0..d37b0412 100644 --- a/src/commands/command.ts +++ b/src/commands/command.ts @@ -6,8 +6,8 @@ import type { SlashCommandBuilder, } from "discord.js"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { BotContext } from "#/context.ts"; export type Command = ApplicationCommand | AutocompleteCommand | MessageCommand | SpecialCommand; diff --git a/src/commands/dadJoke.ts b/src/commands/dadJoke.ts index 85307f56..7ed80c09 100644 --- a/src/commands/dadJoke.ts +++ b/src/commands/dadJoke.ts @@ -1,10 +1,10 @@ import { cleanContent } from "discord.js"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { SpecialCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import { substringAfter } from "#utils/stringUtils.ts"; -import { randomEntry } from "#service/random.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import { substringAfter } from "#/utils/stringUtils.ts"; +import { randomEntry } from "#/service/random.ts"; type Lang = "german" | "austrian"; diff --git a/src/commands/deoida.ts b/src/commands/deoida.ts index 2cd04732..011e1576 100644 --- a/src/commands/deoida.ts +++ b/src/commands/deoida.ts @@ -1,7 +1,7 @@ -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { MessageCommand } from "#commands/command.ts"; -import * as austrianTranslation from "#storage/austrianTranslation.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import * as austrianTranslation from "#/storage/austrianTranslation.ts"; async function deOidaLine(line: string): Promise { // We cannot just split all words using \s*. That could tear apart words or translations like "fescher bub" diff --git a/src/commands/doener.ts b/src/commands/doener.ts index 9f4584a7..5b752868 100644 --- a/src/commands/doener.ts +++ b/src/commands/doener.ts @@ -1,6 +1,6 @@ -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; const prices = { kebab: 5.5, diff --git a/src/commands/download-video.ts b/src/commands/download-video.ts index d7d573c4..303d5a43 100644 --- a/src/commands/download-video.ts +++ b/src/commands/download-video.ts @@ -6,11 +6,11 @@ import { MessageFlags, } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { ApplicationCommand } from "#commands/command.ts"; -import * as ytDlService from "#service/ytDl.ts"; -import assertNever from "#utils/assertNever.ts"; -import TempDir from "#utils/TempDir.ts"; +import type { BotContext } from "#/context.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import * as ytDlService from "#/service/ytDl.ts"; +import assertNever from "#/utils/assertNever.ts"; +import TempDir from "#/utils/TempDir.ts"; export default class DownloadVideoCommand implements ApplicationCommand { name = "Download Video"; // Must be upper case, because this name will be matched against the application command name diff --git a/src/commands/ehre.ts b/src/commands/ehre.ts index 6ef6f8a9..66d421cd 100644 --- a/src/commands/ehre.ts +++ b/src/commands/ehre.ts @@ -12,12 +12,12 @@ import { userMention, } from "discord.js"; -import type { ApplicationCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { EhrePoints } from "#storage/db/model.ts"; -import type { ReactionHandler } from "#handler/ReactionHandler.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { EhrePoints } from "#/storage/db/model.ts"; +import type { ReactionHandler } from "#/handler/ReactionHandler.ts"; -import * as ehreService from "#service/ehre.ts"; +import * as ehreService from "#/service/ehre.ts"; function createUserPointString(e: EhrePoints) { return `${userMention(e.userId)}: ${ehreService.formatPoints(e.points)}`; diff --git a/src/commands/emote.ts b/src/commands/emote.ts index 8af6321f..5013eb22 100644 --- a/src/commands/emote.ts +++ b/src/commands/emote.ts @@ -9,11 +9,11 @@ import { type AutocompleteInteraction, } from "discord.js"; -import type { ApplicationCommand, AutocompleteCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { Emote } from "#storage/db/model.ts"; -import * as emoteLoggingService from "#service/emoteLogging.ts"; -import { formatDateTime } from "#utils/dateUtils.ts"; +import type { ApplicationCommand, AutocompleteCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { Emote } from "#/storage/db/model.ts"; +import * as emoteLoggingService from "#/service/emoteLogging.ts"; +import { formatDateTime } from "#/utils/dateUtils.ts"; function buildSingleEmoteResponse( emote: Emote, diff --git a/src/commands/emoteLogger.ts b/src/commands/emoteLogger.ts index 8e336060..6f79b33a 100644 --- a/src/commands/emoteLogger.ts +++ b/src/commands/emoteLogger.ts @@ -1,9 +1,9 @@ -import type { ProcessableMessage } from "#service/command.ts"; -import type { SpecialCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; -import * as emoteService from "#service/emote.ts"; -import * as emoteLoggingService from "#service/emoteLogging.ts"; +import * as emoteService from "#/service/emote.ts"; +import * as emoteLoggingService from "#/service/emoteLogging.ts"; export default class EmoteLoggerCommand implements SpecialCommand { name = "EmoteLogger"; diff --git a/src/commands/emoteSender.ts b/src/commands/emoteSender.ts index 783d4fac..3f3dc67f 100644 --- a/src/commands/emoteSender.ts +++ b/src/commands/emoteSender.ts @@ -1,7 +1,7 @@ import type { Message } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { SpecialCommand } from "#commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; import log from "#log"; export default class EmoteSenderCommand implements SpecialCommand { diff --git a/src/commands/erinnerung.ts b/src/commands/erinnerung.ts index 89fd1618..3488c80e 100644 --- a/src/commands/erinnerung.ts +++ b/src/commands/erinnerung.ts @@ -12,15 +12,15 @@ import { import * as chrono from "chrono-node"; import * as sentry from "@sentry/node"; -import type { MessageCommand, ApplicationCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { Reminder } from "#storage/db/model.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand, ApplicationCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { Reminder } from "#/storage/db/model.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; import log from "#log"; -import * as reminderService from "#storage/reminders.ts"; -import * as dateUtils from "#utils/dateUtils.ts"; +import * as reminderService from "#/storage/reminders.ts"; +import * as dateUtils from "#/utils/dateUtils.ts"; -import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; +import { ensureChatInputCommand } from "#/utils/interactionUtils.ts"; const validateDate = (date: Date): true | string => { if (!dateUtils.isValidDate(date)) { diff --git a/src/commands/erleuchtung.ts b/src/commands/erleuchtung.ts index b87a85f2..0e6f2cad 100644 --- a/src/commands/erleuchtung.ts +++ b/src/commands/erleuchtung.ts @@ -1,10 +1,10 @@ import { SlashCommandBuilder } from "discord.js"; import type { CommandInteraction, CacheType } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { ApplicationCommand, MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; -import * as erleuchtungService from "#service/erleuchtung.ts"; +import * as erleuchtungService from "#/service/erleuchtung.ts"; export default class ErleuchtungCommand implements MessageCommand, ApplicationCommand { name = "erleuchtung"; diff --git a/src/commands/error.ts b/src/commands/error.ts index 61d82b9c..16cadec8 100644 --- a/src/commands/error.ts +++ b/src/commands/error.ts @@ -1,6 +1,6 @@ import type { MessageCommand } from "./command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { BotContext } from "#/context.ts"; export default class ErrorCommand implements MessageCommand { name = "feler"; diff --git a/src/commands/extend.ts b/src/commands/extend.ts index f6b9c835..b69db546 100644 --- a/src/commands/extend.ts +++ b/src/commands/extend.ts @@ -1,15 +1,15 @@ import { ActionRowBuilder, ComponentType, type Message, StringSelectMenuBuilder } from "discord.js"; -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { Poll } from "#storage/db/model.ts"; - -import * as pollEmbedService from "#service/pollEmbed.ts"; -import { parseLegacyMessageParts } from "#service/command.ts"; -import * as pollService from "#service/poll.ts"; -import { defer } from "#utils/interactionUtils.ts"; -import { truncateToLength } from "#utils/stringUtils.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { Poll } from "#/storage/db/model.ts"; + +import * as pollEmbedService from "#/service/pollEmbed.ts"; +import { parseLegacyMessageParts } from "#/service/command.ts"; +import * as pollService from "#/service/poll.ts"; +import { defer } from "#/utils/interactionUtils.ts"; +import { truncateToLength } from "#/utils/stringUtils.ts"; export default class ExtendCommand implements MessageCommand { name = "extend"; diff --git a/src/commands/faulenzerping.ts b/src/commands/faulenzerping.ts index fd7b41c4..34f769a2 100644 --- a/src/commands/faulenzerping.ts +++ b/src/commands/faulenzerping.ts @@ -15,10 +15,10 @@ import { userMention, } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { ApplicationCommand } from "#commands/command.ts"; -import { chunkArray } from "#utils/arrayUtils.ts"; -import * as time from "#utils/time.ts"; +import type { BotContext } from "#/context.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import { chunkArray } from "#/utils/arrayUtils.ts"; +import * as time from "#/utils/time.ts"; export default class FaulenzerPingCommand implements ApplicationCommand { name = "Faulenzerping"; // Must be upper case, because this name will be matched against the application command name diff --git a/src/commands/ficktabelle.ts b/src/commands/ficktabelle.ts index 57d10c8c..14f318bc 100644 --- a/src/commands/ficktabelle.ts +++ b/src/commands/ficktabelle.ts @@ -1,6 +1,6 @@ -import type { MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import { randomEntry } from "#service/random.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import { randomEntry } from "#/service/random.ts"; const FICKTABELLE_URL = "https://cdn.discordapp.com/attachments/620721921767505942/636149543154614272/20160901-164533-Kovrtep-id1487186.png"; diff --git a/src/commands/geburtstag.ts b/src/commands/geburtstag.ts index 33d6aa4f..ba45fa57 100644 --- a/src/commands/geburtstag.ts +++ b/src/commands/geburtstag.ts @@ -1,9 +1,9 @@ import { type CommandInteraction, type CacheType, SlashCommandBuilder } from "discord.js"; import * as sentry from "@sentry/node"; -import type { ApplicationCommand } from "#commands/command.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; import log from "#log"; -import * as birthday from "#storage/birthday.ts"; +import * as birthday from "#/storage/birthday.ts"; export default class GeburtstagCommand implements ApplicationCommand { name = "geburtstag"; diff --git a/src/commands/gegenstand.ts b/src/commands/gegenstand.ts index c4e33bdb..63f6bcba 100644 --- a/src/commands/gegenstand.ts +++ b/src/commands/gegenstand.ts @@ -12,18 +12,18 @@ import { } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "#context.ts"; -import type { ApplicationCommand } from "#commands/command.ts"; -import type { LootUseCommandInteraction } from "#storage/loot.ts"; -import * as lootService from "#service/loot.ts"; -import * as petService from "#service/pet.ts"; -import * as lootRoleService from "#service/lootRoles.ts"; -import { randomEntry } from "#service/random.ts"; -import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; -import * as imageService from "#service/image.ts"; - -import * as lootDataService from "#service/lootData.ts"; -import { LootAttributeKind, LootKind } from "#service/lootData.ts"; +import type { BotContext } from "#/context.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import type { LootUseCommandInteraction } from "#/storage/loot.ts"; +import * as lootService from "#/service/loot.ts"; +import * as petService from "#/service/pet.ts"; +import * as lootRoleService from "#/service/lootRoles.ts"; +import { randomEntry } from "#/service/random.ts"; +import { ensureChatInputCommand } from "#/utils/interactionUtils.ts"; +import * as imageService from "#/service/image.ts"; + +import * as lootDataService from "#/service/lootData.ts"; +import { LootAttributeKind, LootKind } from "#/service/lootData.ts"; import log from "#log"; diff --git a/src/commands/geringverdiener.ts b/src/commands/geringverdiener.ts index 8d07e2c8..782fc6ec 100644 --- a/src/commands/geringverdiener.ts +++ b/src/commands/geringverdiener.ts @@ -9,9 +9,9 @@ import { type GuildEmojiManager, } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ApplicationCommand, MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; /** * Geringverdieners text diff --git a/src/commands/gibmirids.ts b/src/commands/gibmirids.ts index f8dbd00a..7db8be83 100644 --- a/src/commands/gibmirids.ts +++ b/src/commands/gibmirids.ts @@ -1,9 +1,9 @@ import { ChannelType } from "discord.js"; -import type { ProcessableMessage } from "#service/command.ts"; -import * as chunkingService from "#service/chunking.ts"; -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import * as chunkingService from "#/service/chunking.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; /** * Info command. Displays some useless information about the bot. diff --git a/src/commands/google.ts b/src/commands/google.ts index 24ee60ec..d1d5b21f 100644 --- a/src/commands/google.ts +++ b/src/commands/google.ts @@ -6,8 +6,8 @@ import { SlashCommandUserOption, } from "discord.js"; -import type { ApplicationCommand } from "#commands/command.ts"; -import { randomEntry } from "#service/random.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import { randomEntry } from "#/service/random.ts"; const replies = [ "Da bitte, dein Suchergebnis, du Opfer: {0}", diff --git a/src/commands/hilfe.ts b/src/commands/hilfe.ts index ea4ac125..c73ac349 100644 --- a/src/commands/hilfe.ts +++ b/src/commands/hilfe.ts @@ -1,9 +1,9 @@ import { channelMention, ContextMenuCommandBuilder } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { MessageCommand } from "#commands/command.ts"; -import * as commandService from "#service/command.ts"; -import * as chunking from "#service/chunking.ts"; +import type { BotContext } from "#/context.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import * as commandService from "#/service/command.ts"; +import * as chunking from "#/service/chunking.ts"; export default class HilfeCommand implements MessageCommand { name = "hilfe"; diff --git a/src/commands/info.ts b/src/commands/info.ts index db952ba0..375b3f09 100644 --- a/src/commands/info.ts +++ b/src/commands/info.ts @@ -9,10 +9,10 @@ import { MessageFlags, } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { BotContext } from "#context.ts"; -import assertNever from "#utils/assertNever.ts"; +import type { ApplicationCommand, MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { BotContext } from "#/context.ts"; +import assertNever from "#/utils/assertNever.ts"; interface GitHubContributor { login: string; diff --git a/src/commands/instagram.ts b/src/commands/instagram.ts index 47665574..76459d7d 100644 --- a/src/commands/instagram.ts +++ b/src/commands/instagram.ts @@ -1,8 +1,8 @@ import type { Message } from "discord.js"; -import type { SpecialCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import * as instagramService from "#service/instagram.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import * as instagramService from "#/service/instagram.ts"; const instagramOptions = { uriPattern: diff --git a/src/commands/inventar.ts b/src/commands/inventar.ts index 8706208f..2d6f4efc 100644 --- a/src/commands/inventar.ts +++ b/src/commands/inventar.ts @@ -12,16 +12,16 @@ import { } from "discord.js"; import { createCanvas, loadImage } from "@napi-rs/canvas"; -import type { BotContext } from "#context.ts"; -import type { ApplicationCommand } from "#commands/command.ts"; -import * as lootService from "#service/loot.ts"; -import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; -import * as lootDataService from "#service/lootData.ts"; -import { LootAttributeKind } from "#service/lootData.ts"; +import type { BotContext } from "#/context.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import * as lootService from "#/service/loot.ts"; +import { ensureChatInputCommand } from "#/utils/interactionUtils.ts"; +import * as lootDataService from "#/service/lootData.ts"; +import { LootAttributeKind } from "#/service/lootData.ts"; import log from "#log"; -import { extendContext } from "#utils/ExtendedCanvasContext.ts"; -import { Vec2 } from "#utils/math.ts"; +import { extendContext } from "#/utils/ExtendedCanvasContext.ts"; +import { Vec2 } from "#/utils/math.ts"; export default class InventarCommand implements ApplicationCommand { name = "inventar"; diff --git a/src/commands/invite.ts b/src/commands/invite.ts index ca1b0400..7b0a1b0c 100644 --- a/src/commands/invite.ts +++ b/src/commands/invite.ts @@ -1,5 +1,5 @@ -import type { ProcessableMessage } from "#service/command.ts"; -import type { MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; export const description = ""; diff --git a/src/commands/karte.ts b/src/commands/karte.ts index 64ab22b9..6963ef22 100644 --- a/src/commands/karte.ts +++ b/src/commands/karte.ts @@ -20,14 +20,14 @@ import { type User, } from "discord.js"; -import type { ApplicationCommand } from "#commands/command.ts"; -import * as locationService from "#service/location.ts"; -import type { BotContext } from "#context.ts"; -import { Vec2 } from "#utils/math.ts"; -import * as fontService from "#service/font.ts"; -import { extendContext, type ExtendedCanvasContext } from "#utils/ExtendedCanvasContext.ts"; -import assertNever from "#utils/assertNever.ts"; -import * as petService from "#service/pet.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import * as locationService from "#/service/location.ts"; +import type { BotContext } from "#/context.ts"; +import { Vec2 } from "#/utils/math.ts"; +import * as fontService from "#/service/font.ts"; +import { extendContext, type ExtendedCanvasContext } from "#/utils/ExtendedCanvasContext.ts"; +import assertNever from "#/utils/assertNever.ts"; +import * as petService from "#/service/pet.ts"; const allDirections = [ ["NW", "N", "NE"], diff --git a/src/commands/lauscher.ts b/src/commands/lauscher.ts index 68a20a7f..2ddc27b3 100644 --- a/src/commands/lauscher.ts +++ b/src/commands/lauscher.ts @@ -12,16 +12,16 @@ import { } from "discord.js"; import { type Canvas, createCanvas, loadImage, type Image } from "@napi-rs/canvas"; -import type { ApplicationCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import assertNever from "#utils/assertNever.ts"; -import { getPlaybackStats, setUserRegistration, type TrackStat } from "#service/lauscher.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import assertNever from "#/utils/assertNever.ts"; +import { getPlaybackStats, setUserRegistration, type TrackStat } from "#/service/lauscher.ts"; import { Temporal } from "@js-temporal/polyfill"; -import { truncateToLength } from "#utils/stringUtils.ts"; -import { chunkArray } from "#utils/arrayUtils.ts"; -import { Vec2 } from "#utils/math.ts"; -import * as fontService from "#service/font.ts"; -import { extendContext } from "#utils/ExtendedCanvasContext.ts"; +import { truncateToLength } from "#/utils/stringUtils.ts"; +import { chunkArray } from "#/utils/arrayUtils.ts"; +import { Vec2 } from "#/utils/math.ts"; +import * as fontService from "#/service/font.ts"; +import { extendContext } from "#/utils/ExtendedCanvasContext.ts"; type SubCommand = "aktivierung" | "stats"; diff --git a/src/commands/metafrage.ts b/src/commands/metafrage.ts index 08a287ab..9dcb7221 100644 --- a/src/commands/metafrage.ts +++ b/src/commands/metafrage.ts @@ -1,13 +1,13 @@ import { parseArgs, type ParseArgsConfig } from "node:util"; -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; -import { parseLegacyMessageParts } from "#service/command.ts"; -import { defer } from "#utils/interactionUtils.ts"; +import { parseLegacyMessageParts } from "#/service/command.ts"; +import { defer } from "#/utils/interactionUtils.ts"; -import { randomEntry } from "#service/random.ts"; +import { randomEntry } from "#/service/random.ts"; const argsConfig = { options: { diff --git a/src/commands/min.ts b/src/commands/min.ts index 6eb05d75..b9b9953b 100644 --- a/src/commands/min.ts +++ b/src/commands/min.ts @@ -1,8 +1,8 @@ -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; -import { parseLegacyMessageParts } from "#service/command.ts"; +import { parseLegacyMessageParts } from "#/service/command.ts"; export default class MinCommand implements MessageCommand { name = "min"; diff --git a/src/commands/mock.ts b/src/commands/mock.ts index 5f85a269..29a141a6 100644 --- a/src/commands/mock.ts +++ b/src/commands/mock.ts @@ -8,10 +8,10 @@ import { SlashCommandStringOption, } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; +import type { BotContext } from "#/context.ts"; +import type { ApplicationCommand, MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import { ensureChatInputCommand } from "#/utils/interactionUtils.ts"; /** * Randomly capitalize letters diff --git a/src/commands/modcommands/assigner.ts b/src/commands/modcommands/assigner.ts index 75d61aef..ff7e9ce7 100644 --- a/src/commands/modcommands/assigner.ts +++ b/src/commands/modcommands/assigner.ts @@ -1,6 +1,6 @@ -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import { parseLegacyMessageParts, type ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import { parseLegacyMessageParts, type ProcessableMessage } from "#/service/command.ts"; import log from "#log"; export default class AssignerCommand implements MessageCommand { diff --git a/src/commands/modcommands/ban.ts b/src/commands/modcommands/ban.ts index eff63111..a2d1b663 100644 --- a/src/commands/modcommands/ban.ts +++ b/src/commands/modcommands/ban.ts @@ -8,12 +8,12 @@ import { SlashCommandUserOption, } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { BotContext } from "#context.ts"; +import type { ApplicationCommand, MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { BotContext } from "#/context.ts"; -import * as banService from "#service/ban.ts"; -import { formatDuration } from "#utils/dateUtils.ts"; +import * as banService from "#/service/ban.ts"; +import { formatDuration } from "#/utils/dateUtils.ts"; export default class BanCommand implements ApplicationCommand, MessageCommand { modCommand = true; // needed if invoked via text, not via slash diff --git a/src/commands/modcommands/ghostwriter.ts b/src/commands/modcommands/ghostwriter.ts index f7bdc105..eda9ceef 100644 --- a/src/commands/modcommands/ghostwriter.ts +++ b/src/commands/modcommands/ghostwriter.ts @@ -6,8 +6,8 @@ import { SlashCommandStringOption, } from "discord.js"; -import type { ApplicationCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; export default class GhostwriterCommand implements ApplicationCommand { modCommand = true; diff --git a/src/commands/modcommands/listroles.ts b/src/commands/modcommands/listroles.ts index a7757d32..7bd00fe8 100644 --- a/src/commands/modcommands/listroles.ts +++ b/src/commands/modcommands/listroles.ts @@ -1,6 +1,6 @@ -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; export default class ToggleCommand implements MessageCommand { modCommand = true; diff --git a/src/commands/modcommands/modhilfe.ts b/src/commands/modcommands/modhilfe.ts index 9b13d99c..8cca1200 100644 --- a/src/commands/modcommands/modhilfe.ts +++ b/src/commands/modcommands/modhilfe.ts @@ -1,10 +1,10 @@ -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import * as chunkingService from "#service/chunking.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import * as chunkingService from "#/service/chunking.ts"; -import { replacePrefixPlaceholders } from "#commands/hilfe.ts"; -import * as commandService from "#service/command.ts"; +import { replacePrefixPlaceholders } from "#/commands/hilfe.ts"; +import * as commandService from "#/service/command.ts"; export default class ModHilfeCommand implements MessageCommand { modCommand = true; diff --git a/src/commands/modcommands/unban.ts b/src/commands/modcommands/unban.ts index 8cf197e1..f3c9e92c 100644 --- a/src/commands/modcommands/unban.ts +++ b/src/commands/modcommands/unban.ts @@ -6,10 +6,10 @@ import { } from "discord.js"; import type { Message, CommandInteraction, PermissionsString } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; +import type { ApplicationCommand, MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; -import * as banService from "#service/ban.ts"; +import * as banService from "#/service/ban.ts"; export default class UnbanCommand implements ApplicationCommand, MessageCommand { modCommand = true; // needed if invoked via text, not via slash diff --git a/src/commands/never.ts b/src/commands/never.ts index b8b18054..77b5227d 100644 --- a/src/commands/never.ts +++ b/src/commands/never.ts @@ -7,9 +7,9 @@ import { SlashCommandStringOption, } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { BotContext } from "#context.ts"; +import type { ApplicationCommand, MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { BotContext } from "#/context.ts"; type Prompt = string; diff --git a/src/commands/nickname.ts b/src/commands/nickname.ts index 178e4286..394e4439 100644 --- a/src/commands/nickname.ts +++ b/src/commands/nickname.ts @@ -15,12 +15,12 @@ import { } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "#context.ts"; -import type { ApplicationCommand, AutocompleteCommand } from "#commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ApplicationCommand, AutocompleteCommand } from "#/commands/command.ts"; import log from "#log"; -import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; -import * as nickName from "#storage/nickName.ts"; -import * as time from "#utils/time.ts"; +import { ensureChatInputCommand } from "#/utils/interactionUtils.ts"; +import * as nickName from "#/storage/nickName.ts"; +import * as time from "#/utils/time.ts"; type Vote = "YES" | "NO"; diff --git a/src/commands/nischdaaa.ts b/src/commands/nischdaaa.ts index 6cb41871..2c6d22ea 100644 --- a/src/commands/nischdaaa.ts +++ b/src/commands/nischdaaa.ts @@ -1,5 +1,5 @@ -import type { ProcessableMessage } from "#service/command.ts"; -import type { SpecialCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; export default class NischdaaaCommand implements SpecialCommand { name = "Nischdaaa"; diff --git a/src/commands/oida.ts b/src/commands/oida.ts index 0db9fae1..c4207597 100644 --- a/src/commands/oida.ts +++ b/src/commands/oida.ts @@ -1,9 +1,9 @@ import { type CommandInteraction, SlashCommandBuilder, SlashCommandStringOption } from "discord.js"; -import * as austrianTranslation from "#storage/austrianTranslation.ts"; -import type { ApplicationCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; +import * as austrianTranslation from "#/storage/austrianTranslation.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import { ensureChatInputCommand } from "#/utils/interactionUtils.ts"; export default class OidaCommand implements ApplicationCommand { name = "oida"; diff --git a/src/commands/penis.ts b/src/commands/penis.ts index 35fede3a..711b03ed 100644 --- a/src/commands/penis.ts +++ b/src/commands/penis.ts @@ -1,11 +1,11 @@ import { ContainerBuilder, MessageFlags, time, TimestampStyles, type User } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { Penis } from "#storage/db/model.ts"; -import { NormalDistribution, RandomNumberGenerator, SecureRandomSource } from "#service/random.ts"; -import * as penis from "#storage/penis.ts"; +import type { BotContext } from "#/context.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { Penis } from "#/storage/db/model.ts"; +import { NormalDistribution, RandomNumberGenerator, SecureRandomSource } from "#/service/random.ts"; +import * as penis from "#/storage/penis.ts"; import log from "#log"; diff --git a/src/commands/poll.ts b/src/commands/poll.ts index 3d8d7649..3df2a1bc 100644 --- a/src/commands/poll.ts +++ b/src/commands/poll.ts @@ -1,13 +1,13 @@ import { parseArgs, type ParseArgsConfig } from "node:util"; -import type { BotContext } from "#context.ts"; -import type { MessageCommand } from "#commands/command.ts"; -import { parseLegacyMessageParts, type ProcessableMessage } from "#service/command.ts"; -import * as timeUtils from "#utils/time.ts"; -import * as pollService from "#service/poll.ts"; -import * as legacyDelayedPoll from "#service/delayedPollLegacy.ts"; -import * as pollEmbedService from "#service/pollEmbed.ts"; -import { defer } from "#utils/interactionUtils.ts"; +import type { BotContext } from "#/context.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import { parseLegacyMessageParts, type ProcessableMessage } from "#/service/command.ts"; +import * as timeUtils from "#/utils/time.ts"; +import * as pollService from "#/service/poll.ts"; +import * as legacyDelayedPoll from "#/service/delayedPollLegacy.ts"; +import * as pollEmbedService from "#/service/pollEmbed.ts"; +import { defer } from "#/utils/interactionUtils.ts"; const pollOptionsPresets = { likert: { diff --git a/src/commands/poll2.ts b/src/commands/poll2.ts index 5f832ff5..cc539f63 100644 --- a/src/commands/poll2.ts +++ b/src/commands/poll2.ts @@ -11,8 +11,8 @@ import { TextInputBuilder, TextInputStyle, } from "discord.js"; -import type { ApplicationCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; import log from "#log"; diff --git a/src/commands/roll.ts b/src/commands/roll.ts index 5337bcf1..5ba865b1 100644 --- a/src/commands/roll.ts +++ b/src/commands/roll.ts @@ -1,11 +1,11 @@ import { ChannelType } from "discord.js"; -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; -import { parseLegacyMessageParts, type ProcessableMessage } from "#service/command.ts"; -import { defer } from "#utils/interactionUtils.ts"; -import * as rollService from "#service/roll.ts"; +import { parseLegacyMessageParts, type ProcessableMessage } from "#/service/command.ts"; +import { defer } from "#/utils/interactionUtils.ts"; +import * as rollService from "#/service/roll.ts"; export default class RollCommand implements MessageCommand { name = "roll"; diff --git a/src/commands/saufen.ts b/src/commands/saufen.ts index d2a6aef6..abceff36 100644 --- a/src/commands/saufen.ts +++ b/src/commands/saufen.ts @@ -11,11 +11,11 @@ import { type AutocompleteInteraction, } from "discord.js"; -import type { ApplicationCommand, AutocompleteCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import { connectAndPlaySaufen } from "#handler/voiceHandler.ts"; -import assertNever from "#utils/assertNever.ts"; -import { zonedNow } from "#utils/dateUtils.ts"; +import type { ApplicationCommand, AutocompleteCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import { connectAndPlaySaufen } from "#/handler/voiceHandler.ts"; +import assertNever from "#/utils/assertNever.ts"; +import { zonedNow } from "#/utils/dateUtils.ts"; type SubCommand = "los" | "add" | "list" | "select"; diff --git a/src/commands/sdm.ts b/src/commands/sdm.ts index 50121a0e..624f6027 100644 --- a/src/commands/sdm.ts +++ b/src/commands/sdm.ts @@ -9,9 +9,9 @@ import { EmbedBuilder, } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import { substringAfter } from "#utils/stringUtils.ts"; +import type { ApplicationCommand, MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import { substringAfter } from "#/utils/stringUtils.ts"; const createSecureDecisionMessage = ( question: string, diff --git a/src/commands/selfban.ts b/src/commands/selfban.ts index de8cc6a3..78df4979 100644 --- a/src/commands/selfban.ts +++ b/src/commands/selfban.ts @@ -1,12 +1,12 @@ import { time, TimestampStyles } from "discord.js"; -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; -import * as timeUtils from "#utils/time.ts"; -import * as banService from "#service/ban.ts"; -import { parseLegacyMessageParts } from "#service/command.ts"; +import * as timeUtils from "#/utils/time.ts"; +import * as banService from "#/service/ban.ts"; +import { parseLegacyMessageParts } from "#/service/command.ts"; export default class MinCommand implements MessageCommand { name = "selfban"; diff --git a/src/commands/special/keywordReact.ts b/src/commands/special/keywordReact.ts index 6ad59a1b..f229055e 100644 --- a/src/commands/special/keywordReact.ts +++ b/src/commands/special/keywordReact.ts @@ -1,5 +1,5 @@ -import type { ProcessableMessage } from "#service/command.ts"; -import type { SpecialCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; // this is the former nixos.ts diff --git a/src/commands/splid.ts b/src/commands/splid.ts index 2f90b1c1..f4004c16 100644 --- a/src/commands/splid.ts +++ b/src/commands/splid.ts @@ -13,13 +13,13 @@ import { } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "#context.ts"; -import type { ApplicationCommand, AutocompleteCommand } from "#commands/command.ts"; -import type { SplidMember } from "#service/splid.ts"; +import type { BotContext } from "#/context.ts"; +import type { ApplicationCommand, AutocompleteCommand } from "#/commands/command.ts"; +import type { SplidMember } from "#/service/splid.ts"; -import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; -import * as splidLink from "#storage/splidLink.ts"; -import * as splidService from "#service/splid.ts"; +import { ensureChatInputCommand } from "#/utils/interactionUtils.ts"; +import * as splidLink from "#/storage/splidLink.ts"; +import * as splidService from "#/service/splid.ts"; import log from "#log"; const createNumberFormatter = (currency: string) => diff --git a/src/commands/springerWarning.ts b/src/commands/springerWarning.ts index 540ab937..192ab0a5 100644 --- a/src/commands/springerWarning.ts +++ b/src/commands/springerWarning.ts @@ -1,7 +1,7 @@ import type { Message } from "discord.js"; -import type { SpecialCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; const hosts = { // Taken from: diff --git a/src/commands/stempelgraph.ts b/src/commands/stempelgraph.ts index 6d04ad45..28243f92 100644 --- a/src/commands/stempelgraph.ts +++ b/src/commands/stempelgraph.ts @@ -10,9 +10,9 @@ import { import { Resvg } from "@resvg/resvg-js"; import * as sentry from "@sentry/node"; -import type { ApplicationCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import * as stempelService from "#service/stempel.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import * as stempelService from "#/service/stempel.ts"; import log from "#log"; const supportedLayoutEngines = [ diff --git a/src/commands/stempelkarte.ts b/src/commands/stempelkarte.ts index a2c24938..b738d905 100644 --- a/src/commands/stempelkarte.ts +++ b/src/commands/stempelkarte.ts @@ -12,10 +12,10 @@ import { } from "discord.js"; import * as sentry from "@sentry/node"; -import type { ApplicationCommand } from "#commands/command.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; -import * as stempelService from "#service/stempel.ts"; -import { chunkArray } from "#utils/arrayUtils.ts"; +import * as stempelService from "#/service/stempel.ts"; +import { chunkArray } from "#/utils/arrayUtils.ts"; import log from "#log"; const stempelLocations = [ diff --git a/src/commands/stempeln.ts b/src/commands/stempeln.ts index 049b15fb..be74ce41 100644 --- a/src/commands/stempeln.ts +++ b/src/commands/stempeln.ts @@ -5,9 +5,9 @@ import { ChatInputCommandInteraction, } from "discord.js"; -import type { ApplicationCommand } from "#commands/command.ts"; -import * as stempelService from "#service/stempel.ts"; -import { randomEntry } from "#service/random.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import * as stempelService from "#/service/stempel.ts"; +import { randomEntry } from "#/service/random.ts"; const replies = [ "Der Bruder {0} hat den neuen Bruder {1} eingeladen und du hast dies so eben bestätigt!", diff --git a/src/commands/tiktok.ts b/src/commands/tiktok.ts index 47f8eb1b..5187eccf 100644 --- a/src/commands/tiktok.ts +++ b/src/commands/tiktok.ts @@ -1,6 +1,6 @@ import type { Message } from "discord.js"; -import type { SpecialCommand } from "#commands/command.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; const proxitokInstance = "https://proxitok.pussthecat.org"; // const downloadUrlRegex = /href=["'](\/download[^"']*)["']/; diff --git a/src/commands/toggle.ts b/src/commands/toggle.ts index 14d3dfcf..8eb8f2b8 100644 --- a/src/commands/toggle.ts +++ b/src/commands/toggle.ts @@ -1,10 +1,10 @@ import { type APIEmbedField, EmbedBuilder, type Message } from "discord.js"; -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; -import * as pollEmbedService from "#service/pollEmbed.ts"; +import * as pollEmbedService from "#/service/pollEmbed.ts"; export default class ToggleCommand implements MessageCommand { name = "toggle"; diff --git a/src/commands/vote.ts b/src/commands/vote.ts index efc5e428..c830f463 100644 --- a/src/commands/vote.ts +++ b/src/commands/vote.ts @@ -3,11 +3,11 @@ import { parseArgs, type ParseArgsConfig } from "node:util"; import { cleanContent } from "discord.js"; import { Temporal } from "@js-temporal/polyfill"; -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; -import { parseLegacyMessageParts } from "#service/command.ts"; +import { parseLegacyMessageParts } from "#/service/command.ts"; const argsConfig = { options: { diff --git a/src/commands/vote2.ts b/src/commands/vote2.ts index 7fdd05a7..e1ed3eec 100644 --- a/src/commands/vote2.ts +++ b/src/commands/vote2.ts @@ -16,8 +16,8 @@ import { time, } from "discord.js"; -import * as timeUtils from "#utils/time.ts"; -import type { ApplicationCommand } from "#commands/command.ts"; +import * as timeUtils from "#/utils/time.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; export default class Vote2Command implements ApplicationCommand { name = "vote2"; diff --git a/src/commands/wat.ts b/src/commands/wat.ts index 57dfdda2..b37b94f6 100644 --- a/src/commands/wat.ts +++ b/src/commands/wat.ts @@ -1,6 +1,6 @@ import type { Message } from "discord.js"; -import type { SpecialCommand } from "#commands/command.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; export default class WatCommand implements SpecialCommand { name = "wat"; diff --git a/src/commands/where.ts b/src/commands/where.ts index 6ac7055c..001ee218 100644 --- a/src/commands/where.ts +++ b/src/commands/where.ts @@ -1,9 +1,9 @@ import { type Message, cleanContent } from "discord.js"; import { createCanvas, loadImage } from "@napi-rs/canvas"; -import type { SpecialCommand } from "#commands/command.ts"; -import * as fonts from "#service/font.ts"; -import { countWords, substringAfter } from "#utils/stringUtils.ts"; +import type { SpecialCommand } from "#/commands/command.ts"; +import * as fonts from "#/service/font.ts"; +import { countWords, substringAfter } from "#/utils/stringUtils.ts"; export default class WhereCommand implements SpecialCommand { name = "Where"; diff --git a/src/commands/woislog.ts b/src/commands/woislog.ts index 1d4c69c4..10be3f35 100644 --- a/src/commands/woislog.ts +++ b/src/commands/woislog.ts @@ -1,7 +1,7 @@ import { type CommandInteraction, MessageFlags, SlashCommandBuilder } from "discord.js"; -import type { ApplicationCommand } from "#commands/command.ts"; -import * as voiceStateService from "#service/voiceState.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import * as voiceStateService from "#/service/voiceState.ts"; export default class WoisLog implements ApplicationCommand { name = "woislog"; diff --git a/src/commands/woisvote.ts b/src/commands/woisvote.ts index fac914b2..42b01a7a 100644 --- a/src/commands/woisvote.ts +++ b/src/commands/woisvote.ts @@ -16,11 +16,11 @@ import { MessageFlags, } from "discord.js"; -import type { ReactionHandler } from "#handler/ReactionHandler.ts"; -import type { ApplicationCommand } from "#commands/command.ts"; -import * as woisAction from "#storage/woisAction.ts"; -import type { BotContext } from "#context.ts"; -import { chunkArray } from "#utils/arrayUtils.ts"; +import type { ReactionHandler } from "#/handler/ReactionHandler.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import * as woisAction from "#/storage/woisAction.ts"; +import type { BotContext } from "#/context.ts"; +import { chunkArray } from "#/utils/arrayUtils.ts"; import log from "#log"; const defaultWoisTime = "20:00"; diff --git a/src/commands/wrapped.ts b/src/commands/wrapped.ts index a56f2697..1b41393e 100644 --- a/src/commands/wrapped.ts +++ b/src/commands/wrapped.ts @@ -15,10 +15,10 @@ import { type User, } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { ApplicationCommand } from "#commands/command.ts"; -import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; -import * as statsService from "#service/stats.ts"; +import type { BotContext } from "#/context.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import { ensureChatInputCommand } from "#/utils/interactionUtils.ts"; +import * as statsService from "#/service/stats.ts"; import log from "#log"; export default class WrappedCommand implements ApplicationCommand { diff --git a/src/commands/yoink.ts b/src/commands/yoink.ts index 116e2e3d..5e35ae65 100644 --- a/src/commands/yoink.ts +++ b/src/commands/yoink.ts @@ -10,11 +10,11 @@ import { import log from "#log"; -import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; -import type { ProcessableMessage } from "#service/command.ts"; -import type { BotContext } from "#context.ts"; -import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; -import * as emoteService from "#service/emote.ts"; +import type { ApplicationCommand, MessageCommand } from "#/commands/command.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; +import type { BotContext } from "#/context.ts"; +import { ensureChatInputCommand } from "#/utils/interactionUtils.ts"; +import * as emoteService from "#/service/emote.ts"; /** * Sends instructions on how to ask better questions diff --git a/src/commands/yt-dl.ts b/src/commands/yt-dl.ts index 15ea54b2..2ed75f76 100644 --- a/src/commands/yt-dl.ts +++ b/src/commands/yt-dl.ts @@ -4,12 +4,12 @@ import { SlashCommandBuilder, SlashCommandStringOption, } from "discord.js"; -import type { ApplicationCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; +import type { ApplicationCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; -import * as ytDlService from "#service/ytDl.ts"; -import assertNever from "#utils/assertNever.ts"; -import TempDir from "#utils/TempDir.ts"; +import * as ytDlService from "#/service/ytDl.ts"; +import assertNever from "#/utils/assertNever.ts"; +import TempDir from "#/utils/TempDir.ts"; export default class PollYoutubeDownloadCommand implements ApplicationCommand { name = "yt-dl"; diff --git a/src/commands/zusammenfassung.ts b/src/commands/zusammenfassung.ts index 1da3b9d0..0f7bf4bb 100644 --- a/src/commands/zusammenfassung.ts +++ b/src/commands/zusammenfassung.ts @@ -1,6 +1,6 @@ -import type { MessageCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; export default class ZusammenfassungCommand implements MessageCommand { name = "zusammenfassung"; diff --git a/src/context.ts b/src/context.ts index 79ecc107..4d6d8367 100644 --- a/src/context.ts +++ b/src/context.ts @@ -17,8 +17,8 @@ import { ChannelType } from "discord.js"; import { SpotifyApi } from "@spotify/web-api-ts-sdk"; import { Temporal } from "@js-temporal/polyfill"; -import type { UserMapEntry } from "#commands/aoc.ts"; -import { readConfig } from "#service/config.ts"; +import type { UserMapEntry } from "#/commands/aoc.ts"; +import { readConfig } from "#/service/config.ts"; /** * Object that's passed to every executed command to make it easier to access common channels without repeatedly retrieving stuff via IDs. diff --git a/src/handler/ReactionHandler.ts b/src/handler/ReactionHandler.ts index f9490382..7ba99e07 100644 --- a/src/handler/ReactionHandler.ts +++ b/src/handler/ReactionHandler.ts @@ -1,5 +1,5 @@ import type { MessageReaction, User } from "discord.js"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; export interface ReactionHandler { displayName: string; diff --git a/src/handler/commandHandler.ts b/src/handler/commandHandler.ts index e9aa78f5..8ff66f7f 100644 --- a/src/handler/commandHandler.ts +++ b/src/handler/commandHandler.ts @@ -17,18 +17,18 @@ import * as sentry from "@sentry/node"; * Completely new bullish command handler it unifies slash commands and * message commands and relies on the "new commands" */ -import type { ApplicationCommand, Command, SpecialCommand } from "#commands/command.ts"; -import type { BotContext } from "#context.ts"; -import * as banService from "#service/ban.ts"; +import type { ApplicationCommand, Command, SpecialCommand } from "#/commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import * as banService from "#/service/ban.ts"; import log from "#log"; -import * as commandService from "#service/command.ts"; +import * as commandService from "#/service/command.ts"; -import TriggerReactOnKeyword from "#commands/special/keywordReact.ts"; +import TriggerReactOnKeyword from "#/commands/special/keywordReact.ts"; -import SplidCommand from "#commands/splid.ts"; +import SplidCommand from "#/commands/splid.ts"; -import { isProcessableMessage, type ProcessableMessage } from "#service/command.ts"; +import { isProcessableMessage, type ProcessableMessage } from "#/service/command.ts"; /** Commands that need special init parameters and cannot be instantiated automatically */ const staticCommands: readonly Command[] = [ diff --git a/src/handler/guildMemberHandler.ts b/src/handler/guildMemberHandler.ts index 5df90f58..d5fde2bb 100644 --- a/src/handler/guildMemberHandler.ts +++ b/src/handler/guildMemberHandler.ts @@ -1,7 +1,7 @@ import type { GuildMember, PartialGuildMember } from "discord.js"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; -import * as guildRageQuit from "#storage/guildRageQuit.ts"; +import * as guildRageQuit from "#/storage/guildRageQuit.ts"; import log from "#log"; diff --git a/src/handler/messageCreate/deleteThreadMessagesHandler.ts b/src/handler/messageCreate/deleteThreadMessagesHandler.ts index 43b2b2f3..875f0914 100644 --- a/src/handler/messageCreate/deleteThreadMessagesHandler.ts +++ b/src/handler/messageCreate/deleteThreadMessagesHandler.ts @@ -1,6 +1,6 @@ import { type Message, MessageType } from "discord.js"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; export default async function (message: Message, context: BotContext) { if (message.type !== MessageType.ThreadCreated) { diff --git a/src/handler/messageDeleteHandler.ts b/src/handler/messageDeleteHandler.ts index 6e62c95a..8827c65c 100644 --- a/src/handler/messageDeleteHandler.ts +++ b/src/handler/messageDeleteHandler.ts @@ -1,12 +1,12 @@ import type { ClientUser, Message } from "discord.js"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; -import * as pollService from "#service/poll.ts"; +import * as pollService from "#/service/poll.ts"; -import InstagramLink from "#commands/instagram.ts"; -import SpringerWarningCommand from "#commands/springerWarning.ts"; -import TikTokLink from "#commands/tiktok.ts"; +import InstagramLink from "#/commands/instagram.ts"; +import SpringerWarningCommand from "#/commands/springerWarning.ts"; +import TikTokLink from "#/commands/tiktok.ts"; import log from "#log"; diff --git a/src/handler/presenceHandler.ts b/src/handler/presenceHandler.ts index c2d2d1fc..e9e28cbe 100644 --- a/src/handler/presenceHandler.ts +++ b/src/handler/presenceHandler.ts @@ -1,7 +1,7 @@ import type { Activity, Presence } from "discord.js"; -import type { BotContext } from "#context.ts"; -import { handleSpotifyActivityUpdate, type SpotifyActivity } from "#service/lauscher.ts"; +import type { BotContext } from "#/context.ts"; +import { handleSpotifyActivityUpdate, type SpotifyActivity } from "#/service/lauscher.ts"; export async function handlePresenceUpdate( context: BotContext, diff --git a/src/handler/reaction/logEmotesReactionHandler.ts b/src/handler/reaction/logEmotesReactionHandler.ts index 6264fb98..ff6a7777 100644 --- a/src/handler/reaction/logEmotesReactionHandler.ts +++ b/src/handler/reaction/logEmotesReactionHandler.ts @@ -1,6 +1,6 @@ import type { ReactionHandler } from "../ReactionHandler.ts"; -import * as emoteLoggingService from "#service/emoteLogging.ts"; +import * as emoteLoggingService from "#/service/emoteLogging.ts"; export default { displayName: "Log Emotes Reaction Handler", diff --git a/src/handler/reaction/pollReactionHandler.ts b/src/handler/reaction/pollReactionHandler.ts index bfe23214..91978ea4 100644 --- a/src/handler/reaction/pollReactionHandler.ts +++ b/src/handler/reaction/pollReactionHandler.ts @@ -1,10 +1,10 @@ import type { MessageReaction, User } from "discord.js"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; import type { ReactionHandler } from "../ReactionHandler.ts"; -import * as pollService from "#service/poll.ts"; -import { POLL_EMOJIS, VOTE_EMOJIS } from "#service/poll.ts"; +import * as pollService from "#/service/poll.ts"; +import { POLL_EMOJIS, VOTE_EMOJIS } from "#/service/poll.ts"; export default { displayName: "Poll Reaction Handler", diff --git a/src/handler/reaction/quoteHandler.ts b/src/handler/reaction/quoteHandler.ts index 2a02890d..bfb0bb0e 100644 --- a/src/handler/reaction/quoteHandler.ts +++ b/src/handler/reaction/quoteHandler.ts @@ -11,11 +11,11 @@ import { } from "discord.js"; import { Temporal } from "@js-temporal/polyfill"; -import type { BotContext, QuoteConfig } from "#context.ts"; +import type { BotContext, QuoteConfig } from "#/context.ts"; import type { ReactionHandler } from "../ReactionHandler.ts"; import log from "#log"; -import * as quoteService from "#service/quote.ts"; +import * as quoteService from "#/service/quote.ts"; const quoteMessage = "Ihr quoted echt jeden Scheiß, oder?"; diff --git a/src/handler/reaction/roleAssignerHandler.ts b/src/handler/reaction/roleAssignerHandler.ts index 95ca1b34..0604e8ca 100644 --- a/src/handler/reaction/roleAssignerHandler.ts +++ b/src/handler/reaction/roleAssignerHandler.ts @@ -1,6 +1,6 @@ import type { MessageReaction, User } from "discord.js"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; import type { ReactionHandler } from "../ReactionHandler.ts"; import log from "#log"; diff --git a/src/handler/voiceHandler.ts b/src/handler/voiceHandler.ts index 3c468a1d..bc51a840 100644 --- a/src/handler/voiceHandler.ts +++ b/src/handler/voiceHandler.ts @@ -18,9 +18,9 @@ import type { VoiceChannel } from "discord.js"; import * as gad from "get-audio-duration"; import * as sentry from "@sentry/node"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; -import { randomEntry } from "#service/random.ts"; +import { randomEntry } from "#/service/random.ts"; import log from "#log"; const player = createAudioPlayer(); diff --git a/src/service/aprilFools.ts b/src/service/aprilFools.ts index 964d1ea7..fef0e6b6 100644 --- a/src/service/aprilFools.ts +++ b/src/service/aprilFools.ts @@ -1,10 +1,10 @@ import type { Collection, GuildMember, Role, Snowflake } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "#context.ts"; -import * as penis from "#storage/penis.ts"; -import * as boob from "#storage/boob.ts"; -import { shuffleArray } from "#utils/arrayUtils.ts"; +import type { BotContext } from "#/context.ts"; +import * as penis from "#/storage/penis.ts"; +import * as boob from "#/storage/boob.ts"; +import { shuffleArray } from "#/utils/arrayUtils.ts"; import log from "#log"; // Store old usernames. Hope the bot doesn't crash lol diff --git a/src/service/bahncard.ts b/src/service/bahncard.ts index 02b41f22..897253b9 100644 --- a/src/service/bahncard.ts +++ b/src/service/bahncard.ts @@ -3,12 +3,12 @@ import * as fs from "node:fs/promises"; import type { User } from "discord.js"; import { createCanvas, loadImage } from "@napi-rs/canvas"; -import type { BotContext } from "#context.ts"; -import type { Loot } from "#storage/db/model.ts"; -import type { LootTemplate } from "#storage/loot.ts"; -import * as fontService from "#service/font.ts"; -import { Vec2 } from "#utils/math.ts"; -import { extendContext } from "#utils/ExtendedCanvasContext.ts"; +import type { BotContext } from "#/context.ts"; +import type { Loot } from "#/storage/db/model.ts"; +import type { LootTemplate } from "#/storage/loot.ts"; +import * as fontService from "#/service/font.ts"; +import { Vec2 } from "#/utils/math.ts"; +import { extendContext } from "#/utils/ExtendedCanvasContext.ts"; const namePos = new Vec2(38, 567); const avatarPos = new Vec2(790, 230); diff --git a/src/service/ban.ts b/src/service/ban.ts index f2bfd721..d8e587fe 100644 --- a/src/service/ban.ts +++ b/src/service/ban.ts @@ -2,10 +2,10 @@ import { time, type GuildMember, type User, TimestampStyles } from "discord.js"; import * as sentry from "@sentry/node"; import { Temporal } from "@js-temporal/polyfill"; -import type { BotContext } from "#context.ts"; -import * as ban from "#storage/ban.ts"; -import { formatDuration } from "#utils/dateUtils.ts"; -import * as timeUtils from "#utils/time.ts"; +import type { BotContext } from "#/context.ts"; +import * as ban from "#/storage/ban.ts"; +import { formatDuration } from "#/utils/dateUtils.ts"; +import * as timeUtils from "#/utils/time.ts"; import log from "#log"; diff --git a/src/service/banner.ts b/src/service/banner.ts index 983c0847..e172bed6 100644 --- a/src/service/banner.ts +++ b/src/service/banner.ts @@ -1,8 +1,8 @@ import * as path from "node:path"; import * as fs from "node:fs/promises"; -import type { BotContext } from "#context.ts"; -import { randomEntry } from "#service/random.ts"; +import type { BotContext } from "#/context.ts"; +import { randomEntry } from "#/service/random.ts"; import log from "#log"; export const rotate = async (context: BotContext) => { diff --git a/src/service/birthday.ts b/src/service/birthday.ts index 404c2075..0910a0e1 100644 --- a/src/service/birthday.ts +++ b/src/service/birthday.ts @@ -2,11 +2,11 @@ import type { GuildMember, Role } from "discord.js"; import * as sentry from "@sentry/node"; import log from "#log"; -import * as birthday from "#storage/birthday.ts"; -import * as lootService from "#service/loot.ts"; -import * as lootDataService from "#service/lootData.ts"; +import * as birthday from "#/storage/birthday.ts"; +import * as lootService from "#/service/loot.ts"; +import * as lootDataService from "#/service/lootData.ts"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; /** * Iterates over the list of birthdays and assigns a role to people having their cake day. diff --git a/src/service/command.ts b/src/service/command.ts index 92be3bfa..5d632ab8 100644 --- a/src/service/command.ts +++ b/src/service/command.ts @@ -4,8 +4,8 @@ import * as path from "node:path"; import type { Guild, GuildMember, Message } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "#context.ts"; -import type { Command } from "#commands/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { Command } from "#/commands/command.ts"; import log from "#log"; diff --git a/src/service/cron.ts b/src/service/cron.ts index d05c0076..2e398bdf 100644 --- a/src/service/cron.ts +++ b/src/service/cron.ts @@ -1,26 +1,26 @@ import { Cron, type CronOptions } from "croner"; -import type { BotContext } from "#context.ts"; -import { rerollNicknames } from "#service/nickNameRoll.ts"; -import { connectAndPlaySaufen } from "#handler/voiceHandler.ts"; -import { reminderHandler } from "#commands/erinnerung.ts"; -import { endAprilFools, startAprilFools } from "#service/aprilFools.ts"; -import { woisVoteScheduler } from "#commands/woisvote.ts"; -import { publishAocLeaderBoard } from "#commands/aoc.ts"; -import { rotate } from "#service/banner.ts"; -import { leetTask } from "#service/purge.ts"; -import { processBans } from "#service/ban.ts"; -import { runDropAttempt } from "#service/lootDrop.ts"; -import { clearWoisLogTask } from "#service/voiceState.ts"; -import { checkBirthdays } from "#service/birthday.ts"; -import { handleFadingMessages } from "#service/fadingMessage.ts"; -import { checkExpiredShifts } from "#service/lootRoles.ts"; -import { sendTrichterUnser } from "#service/trichterUnser.ts"; -import { degradeItems, exposeWithRadiation, runHalfLife } from "#service/lootDegradation.ts"; -import { hatchEggs } from "#service/hatching.ts"; +import type { BotContext } from "#/context.ts"; +import { rerollNicknames } from "#/service/nickNameRoll.ts"; +import { connectAndPlaySaufen } from "#/handler/voiceHandler.ts"; +import { reminderHandler } from "#/commands/erinnerung.ts"; +import { endAprilFools, startAprilFools } from "#/service/aprilFools.ts"; +import { woisVoteScheduler } from "#/commands/woisvote.ts"; +import { publishAocLeaderBoard } from "#/commands/aoc.ts"; +import { rotate } from "#/service/banner.ts"; +import { leetTask } from "#/service/purge.ts"; +import { processBans } from "#/service/ban.ts"; +import { runDropAttempt } from "#/service/lootDrop.ts"; +import { clearWoisLogTask } from "#/service/voiceState.ts"; +import { checkBirthdays } from "#/service/birthday.ts"; +import { handleFadingMessages } from "#/service/fadingMessage.ts"; +import { checkExpiredShifts } from "#/service/lootRoles.ts"; +import { sendTrichterUnser } from "#/service/trichterUnser.ts"; +import { degradeItems, exposeWithRadiation, runHalfLife } from "#/service/lootDegradation.ts"; +import { hatchEggs } from "#/service/hatching.ts"; -import * as pollLegacy from "#service/delayedPollLegacy.ts"; -import * as ehre from "#storage/ehre.ts"; +import * as pollLegacy from "#/service/delayedPollLegacy.ts"; +import * as ehre from "#/storage/ehre.ts"; const options = { timezone: "Europe/Berlin", diff --git a/src/service/delayedPollLegacy.ts b/src/service/delayedPollLegacy.ts index 13bd7f80..75c3acbf 100644 --- a/src/service/delayedPollLegacy.ts +++ b/src/service/delayedPollLegacy.ts @@ -1,10 +1,10 @@ import type { Message, Snowflake, User } from "discord.js"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; import log from "#log"; -import * as additionalMessageData from "#storage/additionalMessageData.ts"; -import * as pollEmbedService from "#service/pollEmbed.ts"; -import { truncateToLength } from "#utils/stringUtils.ts"; +import * as additionalMessageData from "#/storage/additionalMessageData.ts"; +import * as pollEmbedService from "#/service/pollEmbed.ts"; +import { truncateToLength } from "#/utils/stringUtils.ts"; interface DelayedPoll { pollId: string; diff --git a/src/service/ehre.ts b/src/service/ehre.ts index e81ac283..4d0faab5 100644 --- a/src/service/ehre.ts +++ b/src/service/ehre.ts @@ -1,6 +1,6 @@ import type { User } from "discord.js"; -import * as ehre from "#storage/ehre.ts"; +import * as ehre from "#/storage/ehre.ts"; export async function addEhre(thankingUser: User, ehrenbruder: User): Promise { if (thankingUser.id === ehrenbruder.id) { diff --git a/src/service/emoteLogging.ts b/src/service/emoteLogging.ts index 9fe23de0..8d61fb7d 100644 --- a/src/service/emoteLogging.ts +++ b/src/service/emoteLogging.ts @@ -1,9 +1,9 @@ import type { MessageReaction } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { ProcessableMessage } from "#service/command.ts"; +import type { BotContext } from "#/context.ts"; +import type { ProcessableMessage } from "#/service/command.ts"; -import * as dbEmote from "#storage/emote.ts"; +import * as dbEmote from "#/storage/emote.ts"; import * as emoteService from "./emote.ts"; import log from "#log"; diff --git a/src/service/fadingMessage.ts b/src/service/fadingMessage.ts index c872bf33..7e1929e3 100644 --- a/src/service/fadingMessage.ts +++ b/src/service/fadingMessage.ts @@ -2,10 +2,10 @@ import type { TextChannel } from "discord.js"; import * as sentry from "@sentry/node"; import { Temporal } from "@js-temporal/polyfill"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; import log from "#log"; -import * as fadingMessage from "#storage/fadingMessage.ts"; +import * as fadingMessage from "#/storage/fadingMessage.ts"; export async function handleFadingMessages(context: BotContext) { const now = Temporal.Now.instant(); diff --git a/src/service/hatching.ts b/src/service/hatching.ts index e3e9905b..24b25abc 100644 --- a/src/service/hatching.ts +++ b/src/service/hatching.ts @@ -2,11 +2,11 @@ import * as fs from "node:fs/promises"; import { userMention } from "discord.js"; -import type { BotContext } from "#context.ts"; -import type { Loot } from "#storage/db/model.ts"; +import type { BotContext } from "#/context.ts"; +import type { Loot } from "#/storage/db/model.ts"; import log from "#log"; -import * as time from "#utils/time.ts"; -import * as lootService from "#service/loot.ts"; +import * as time from "#/utils/time.ts"; +import * as lootService from "#/service/loot.ts"; import { LootKind, resolveLootTemplate } from "./lootData.ts"; import * as randomService from "./random.ts"; diff --git a/src/service/instagram.ts b/src/service/instagram.ts index 74b7f3e0..6747090b 100644 --- a/src/service/instagram.ts +++ b/src/service/instagram.ts @@ -4,7 +4,7 @@ import * as sentry from "@sentry/node"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; interface LinkEntry { quality: string; diff --git a/src/service/lauscher.ts b/src/service/lauscher.ts index 3602e9a2..ca74d3c5 100644 --- a/src/service/lauscher.ts +++ b/src/service/lauscher.ts @@ -1,4 +1,4 @@ -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; import { getRecentPlaybacks, insertRegistration, diff --git a/src/service/location.ts b/src/service/location.ts index 3252c5ae..377ae48f 100644 --- a/src/service/location.ts +++ b/src/service/location.ts @@ -1,9 +1,9 @@ import type { User } from "discord.js"; -import assertNever from "#utils/assertNever.ts"; +import assertNever from "#/utils/assertNever.ts"; -import * as locationHistory from "#storage/locationHistory.ts"; -import type { MapLocation } from "#storage/db/model.ts"; +import * as locationHistory from "#/storage/locationHistory.ts"; +import type { MapLocation } from "#/storage/db/model.ts"; import fs from "node:fs/promises"; import path from "node:path"; diff --git a/src/service/loot.ts b/src/service/loot.ts index a5fffb47..54e4929f 100644 --- a/src/service/loot.ts +++ b/src/service/loot.ts @@ -1,10 +1,10 @@ import type { User, Snowflake, Message } from "discord.js"; import { Temporal } from "@js-temporal/polyfill"; -import type { LootId, LootInsertable, LootOrigin } from "#storage/db/model.ts"; +import type { LootId, LootInsertable, LootOrigin } from "#/storage/db/model.ts"; import type { LootAttributeKindId, LootKindId } from "./lootData.ts"; -import * as loot from "#storage/loot.ts"; -import * as lootDataService from "#service/lootData.ts"; +import * as loot from "#/storage/loot.ts"; +import * as lootDataService from "#/service/lootData.ts"; export async function getInventoryContents(user: User): Promise { const contents = await loot.findOfUserWithAttributes(user); diff --git a/src/service/lootData.ts b/src/service/lootData.ts index 40437e55..e3e5e136 100644 --- a/src/service/lootData.ts +++ b/src/service/lootData.ts @@ -1,11 +1,11 @@ -import type { LootAttributeTemplate, LootTemplate } from "#storage/loot.ts"; +import type { LootAttributeTemplate, LootTemplate } from "#/storage/loot.ts"; -import * as lootDropService from "#service/lootDrop.ts"; -import * as lootService from "#service/loot.ts"; -import * as emoteService from "#service/emote.ts"; -import * as bahnCardService from "#service/bahncard.ts"; +import * as lootDropService from "#/service/lootDrop.ts"; +import * as lootService from "#/service/loot.ts"; +import * as emoteService from "#/service/emote.ts"; +import * as bahnCardService from "#/service/bahncard.ts"; import { GuildMember, type Guild } from "discord.js"; -import type { Loot, LootAttribute } from "#storage/db/model.ts"; +import type { Loot, LootAttribute } from "#/storage/db/model.ts"; const ACHTUNG_NICHT_DROPBAR_WEIGHT_KG = 0; @@ -408,7 +408,7 @@ export const lootTemplateMap: Record = { asset: "assets/loot/23-ehre.jpg", excludeFromInventory: true, onDrop: async (_context, winner, _channel, _loot) => { - const ehre = await import("#storage/ehre.ts"); + const ehre = await import("#/storage/ehre.ts"); await ehre.addPoints(winner.id, 1); }, }, diff --git a/src/service/lootDegradation.ts b/src/service/lootDegradation.ts index 81ca0a94..e1bd63ce 100644 --- a/src/service/lootDegradation.ts +++ b/src/service/lootDegradation.ts @@ -1,11 +1,11 @@ import { ContainerBuilder, MessageFlags, type Snowflake, userMention } from "discord.js"; -import type { BotContext } from "#context.ts"; -import * as time from "#utils/time.ts"; -import * as lootService from "#service/loot.ts"; -import { LootAttributeKind, LootKind, resolveLootTemplate } from "#service/lootData.ts"; +import type { BotContext } from "#/context.ts"; +import * as time from "#/utils/time.ts"; +import * as lootService from "#/service/loot.ts"; +import { LootAttributeKind, LootKind, resolveLootTemplate } from "#/service/lootData.ts"; import log from "#log"; -import { randomEntry } from "#service/random.ts"; +import { randomEntry } from "#/service/random.ts"; export async function degradeItems(_context: BotContext) { log.info("Degrading loot items"); diff --git a/src/service/lootDrop.ts b/src/service/lootDrop.ts index 5f34ae9f..cc092308 100644 --- a/src/service/lootDrop.ts +++ b/src/service/lootDrop.ts @@ -20,20 +20,20 @@ import { import { Temporal } from "@js-temporal/polyfill"; import * as sentry from "@sentry/node"; -import type { BotContext } from "#context.ts"; -import type { Loot, LootId } from "#storage/db/model.ts"; -import type { LootTemplate, TimeBasedWeightConfig } from "#storage/loot.ts"; -import { randomBoolean, randomEntry, randomEntryWeighted } from "#service/random.ts"; -import * as timeUtils from "#utils/time.ts"; -import { zonedNow } from "#utils/dateUtils.ts"; - -import * as lootService from "#service/loot.ts"; +import type { BotContext } from "#/context.ts"; +import type { Loot, LootId } from "#/storage/db/model.ts"; +import type { LootTemplate, TimeBasedWeightConfig } from "#/storage/loot.ts"; +import { randomBoolean, randomEntry, randomEntryWeighted } from "#/service/random.ts"; +import * as timeUtils from "#/utils/time.ts"; +import { zonedNow } from "#/utils/dateUtils.ts"; + +import * as lootService from "#/service/loot.ts"; import { LootAttributeClass, lootAttributeTemplates, LootKind, lootTemplates, -} from "#service/lootData.ts"; +} from "#/service/lootData.ts"; import log from "#log"; diff --git a/src/service/lootRoles.ts b/src/service/lootRoles.ts index 85ef95ec..4216be7f 100644 --- a/src/service/lootRoles.ts +++ b/src/service/lootRoles.ts @@ -1,9 +1,9 @@ import type { GuildChannel, GuildMember, TextChannel } from "discord.js"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; -import { LootKind } from "#service/lootData.ts"; -import * as lootService from "#service/loot.ts"; +import { LootKind } from "#/service/lootData.ts"; +import * as lootService from "#/service/loot.ts"; import log from "#log"; diff --git a/src/service/nickNameRoll.ts b/src/service/nickNameRoll.ts index a95b7648..21a821a4 100644 --- a/src/service/nickNameRoll.ts +++ b/src/service/nickNameRoll.ts @@ -1,9 +1,9 @@ import * as sentry from "@sentry/node"; -import * as nickName from "#storage/nickName.ts"; -import { randomEntry } from "#service/random.ts"; +import * as nickName from "#/storage/nickName.ts"; +import { randomEntry } from "#/service/random.ts"; import log from "#log"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; export async function rerollNicknames(context: BotContext) { log.debug("Entered `rerollNicknames`"); diff --git a/src/service/pet.ts b/src/service/pet.ts index 55da2df3..8dac4891 100644 --- a/src/service/pet.ts +++ b/src/service/pet.ts @@ -1,9 +1,9 @@ import type { User } from "discord.js"; -import * as lootService from "#service/loot.ts"; +import * as lootService from "#/service/loot.ts"; import { LootKind } from "./lootData.ts"; -import * as pet from "#storage/pet.ts"; -import * as lootData from "#service/lootData.ts"; +import * as pet from "#/storage/pet.ts"; +import * as lootData from "#/service/lootData.ts"; const petCandidates = new Set([ LootKind.KADSE, diff --git a/src/service/poll.ts b/src/service/poll.ts index 878e919c..cb1c3c0a 100644 --- a/src/service/poll.ts +++ b/src/service/poll.ts @@ -1,13 +1,13 @@ import type { GuildMember, Message, MessageReaction, TextBasedChannel, User } from "discord.js"; import { Temporal } from "@js-temporal/polyfill"; -import * as legacyDelayedPoll from "#service/delayedPollLegacy.ts"; -import type { Poll, PollId } from "#storage/db/model.ts"; -import type { BotContext } from "#context.ts"; -import * as polls from "#storage/poll.ts"; -import * as fadingMessage from "#storage/fadingMessage.ts"; -import * as additionalMessageData from "#storage/additionalMessageData.ts"; -import { EMOJI } from "#service/pollEmbed.ts"; +import * as legacyDelayedPoll from "#/service/delayedPollLegacy.ts"; +import type { Poll, PollId } from "#/storage/db/model.ts"; +import type { BotContext } from "#/context.ts"; +import * as polls from "#/storage/poll.ts"; +import * as fadingMessage from "#/storage/fadingMessage.ts"; +import * as additionalMessageData from "#/storage/additionalMessageData.ts"; +import { EMOJI } from "#/service/pollEmbed.ts"; import log from "#log"; diff --git a/src/service/purge.ts b/src/service/purge.ts index b2596d24..43b5b216 100644 --- a/src/service/purge.ts +++ b/src/service/purge.ts @@ -1,4 +1,4 @@ -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; import log from "#log"; diff --git a/src/service/quote.ts b/src/service/quote.ts index e783684a..b780f3d9 100644 --- a/src/service/quote.ts +++ b/src/service/quote.ts @@ -1,6 +1,6 @@ import type { Message } from "discord.js"; -import * as quoteStorage from "#storage/quote.ts"; +import * as quoteStorage from "#/storage/quote.ts"; export async function addQuoteIfNotPresent(message: Message): Promise { return await quoteStorage.addQuoteIfNotPresent({ diff --git a/src/service/splid.ts b/src/service/splid.ts index e6105db3..26c4714d 100644 --- a/src/service/splid.ts +++ b/src/service/splid.ts @@ -1,10 +1,10 @@ import type { Guild, User } from "discord.js"; import { SplidClient } from "splid-js"; -import type { SplidGroup } from "#storage/db/model.ts"; +import type { SplidGroup } from "#/storage/db/model.ts"; -import * as splidGroup from "#storage/splidGroup.ts"; -import * as time from "#utils/time.ts"; +import * as splidGroup from "#/storage/splidGroup.ts"; +import * as time from "#/utils/time.ts"; import log from "#log"; type ExternalInfo = { name: string; objectId: string }; diff --git a/src/service/stats.ts b/src/service/stats.ts index a3dcce6c..d371edb1 100644 --- a/src/service/stats.ts +++ b/src/service/stats.ts @@ -6,7 +6,7 @@ import { sql } from "kysely"; import type { Snowflake } from "discord.js"; -import type { Database } from "#storage/db/model.ts"; +import type { Database } from "#/storage/db/model.ts"; import type { Kysely } from "kysely"; import db from "#db"; diff --git a/src/service/stempel.ts b/src/service/stempel.ts index eab2a9b0..952137ec 100644 --- a/src/service/stempel.ts +++ b/src/service/stempel.ts @@ -1,6 +1,6 @@ import type { GuildMember } from "discord.js"; -import * as stempel from "#storage/stempel.ts"; +import * as stempel from "#/storage/stempel.ts"; export function getStempelByInviter(inviter: GuildMember) { return stempel.getStempelByInviter(inviter); diff --git a/src/service/trichterUnser.ts b/src/service/trichterUnser.ts index 33acef68..ab3d2247 100644 --- a/src/service/trichterUnser.ts +++ b/src/service/trichterUnser.ts @@ -1,5 +1,5 @@ import { ContainerBuilder, MessageFlags } from "discord.js"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; export async function sendTrichterUnser(context: BotContext) { await context.textChannels.hauptchat.send({ diff --git a/src/service/voiceState.ts b/src/service/voiceState.ts index 1ebe9480..f0106c6e 100644 --- a/src/service/voiceState.ts +++ b/src/service/voiceState.ts @@ -1,7 +1,7 @@ import type { VoiceState } from "discord.js"; import { Temporal } from "@js-temporal/polyfill"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; import log from "#log"; export interface VoiceUpdateEvent { diff --git a/src/service/ytDl.ts b/src/service/ytDl.ts index 30fdaa89..d73900d1 100644 --- a/src/service/ytDl.ts +++ b/src/service/ytDl.ts @@ -3,7 +3,7 @@ import * as fs from "node:fs/promises"; import { create as createYoutubeDl, type Flags, type Payload } from "youtube-dl-exec"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; const ytdl = createYoutubeDl("yt-dlp"); diff --git a/src/storage/db/db.ts b/src/storage/db/db.ts index 4a2db76d..e738d3c1 100644 --- a/src/storage/db/db.ts +++ b/src/storage/db/db.ts @@ -10,7 +10,7 @@ import { SqliteDialect } from "./dialect/sqlite-dialect.ts"; import type { Database } from "./model.ts"; import datePlugin from "./date-plugin.ts"; import { SqliteBooleanPlugin } from "./boolean-plugin.ts"; -import assertNever from "#utils/assertNever.ts"; +import assertNever from "#/utils/assertNever.ts"; import log from "#log"; let kysely: Kysely; diff --git a/src/storage/db/model.ts b/src/storage/db/model.ts index 61d2baa1..44edc966 100644 --- a/src/storage/db/model.ts +++ b/src/storage/db/model.ts @@ -1,4 +1,4 @@ -import type { LootAttributeClassId, LootAttributeKindId, LootKindId } from "#service/lootData.ts"; +import type { LootAttributeClassId, LootAttributeKindId, LootKindId } from "#/service/lootData.ts"; import type { Snowflake } from "discord.js"; import type { ColumnType, Generated, GeneratedAlways, Insertable, Selectable } from "kysely"; diff --git a/src/storage/lauscher.ts b/src/storage/lauscher.ts index 17b7ab33..bed52a8d 100644 --- a/src/storage/lauscher.ts +++ b/src/storage/lauscher.ts @@ -1,7 +1,7 @@ import { Temporal } from "@js-temporal/polyfill"; // TODO: Remove once Node.js ships temporal import type { User } from "discord.js"; -import type { LauscherRegistration, LauscherSpotifyLogEntry } from "#storage/db/model.ts"; +import type { LauscherRegistration, LauscherSpotifyLogEntry } from "#/storage/db/model.ts"; import db from "#db"; import log from "#log"; diff --git a/src/storage/locationHistory.ts b/src/storage/locationHistory.ts index 65bf5c54..6914397c 100644 --- a/src/storage/locationHistory.ts +++ b/src/storage/locationHistory.ts @@ -1,7 +1,7 @@ import type { Snowflake } from "discord.js"; import db from "#db"; -import type { MapLocation } from "#storage/db/model.ts"; +import type { MapLocation } from "#/storage/db/model.ts"; export async function getPositionForUser( userId: Snowflake, diff --git a/src/storage/loot.ts b/src/storage/loot.ts index e6c325d7..c39f6dae 100644 --- a/src/storage/loot.ts +++ b/src/storage/loot.ts @@ -10,7 +10,7 @@ import type { import { type ExpressionBuilder, sql } from "kysely"; import type { Temporal } from "@js-temporal/polyfill"; -import type { BotContext } from "#context.ts"; +import type { BotContext } from "#/context.ts"; import type { Database, Loot, @@ -26,7 +26,7 @@ import { resolveLootAttributeTemplate, type LootAttributeKindId, type LootAttributeClassId, -} from "#service/lootData.ts"; +} from "#/service/lootData.ts"; export type LootUseCommandInteraction = ChatInputCommandInteraction & { channel: GuildTextBasedChannel; diff --git a/src/storage/penis.ts b/src/storage/penis.ts index 9c664f49..5c03ca3b 100644 --- a/src/storage/penis.ts +++ b/src/storage/penis.ts @@ -1,6 +1,6 @@ import type { Snowflake, User } from "discord.js"; -import type { Penis } from "#storage/db/model.ts"; +import type { Penis } from "#/storage/db/model.ts"; import db from "#db"; import log from "#log"; diff --git a/src/storage/quote.ts b/src/storage/quote.ts index 52cf08e7..75578098 100644 --- a/src/storage/quote.ts +++ b/src/storage/quote.ts @@ -1,7 +1,7 @@ import type { Snowflake } from "discord.js"; import { sql, type Insertable } from "kysely"; -import type { QuotedMessagesTable } from "#storage/db/model.ts"; +import type { QuotedMessagesTable } from "#/storage/db/model.ts"; import db from "#db"; diff --git a/src/utils/ExtendedCanvasContext.ts b/src/utils/ExtendedCanvasContext.ts index 8257dc23..3dbd352d 100644 --- a/src/utils/ExtendedCanvasContext.ts +++ b/src/utils/ExtendedCanvasContext.ts @@ -1,6 +1,6 @@ import type { SKRSContext2D, Image } from "@napi-rs/canvas"; -import * as fontService from "#service/font.ts"; +import * as fontService from "#/service/font.ts"; import type { Vec2 } from "./math.ts"; export interface ExtendedCanvasContext extends SKRSContext2D { diff --git a/src/utils/smoke.test.ts b/src/utils/smoke.test.ts index 3efbcedd..1dbd10ff 100644 --- a/src/utils/smoke.test.ts +++ b/src/utils/smoke.test.ts @@ -2,8 +2,8 @@ import { describe, test } from "node:test"; import { expect } from "expect"; -import { createDatabase, closeDatabase } from "#storage/db/database-test-init.ts"; -import { defer } from "#utils/interactionUtils.ts"; +import { createDatabase, closeDatabase } from "#/storage/db/database-test-init.ts"; +import { defer } from "#/utils/interactionUtils.ts"; import db from "#db";