From 139ee6c6a0e90378fe69262052f78f4c6b5621f4 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 17:08:51 +0100 Subject: [PATCH 01/22] Use newer imports --- package-lock.json | 2 +- package.json | 4 +- src/app.ts | 40 +++++++++---------- src/commands/aoc.ts | 4 +- src/commands/autoEhre.ts | 6 +-- src/commands/banlist.ts | 8 ++-- src/commands/bonk.ts | 4 +- src/commands/boobs.ts | 10 ++--- src/commands/clap.ts | 6 +-- src/commands/command.ts | 4 +- src/commands/dadJoke.ts | 10 ++--- src/commands/deoida.ts | 8 ++-- src/commands/doener.ts | 6 +-- src/commands/download-video.ts | 10 ++--- src/commands/ehre.ts | 10 ++--- src/commands/emote.ts | 10 ++--- src/commands/emoteLogger.ts | 10 ++--- src/commands/emoteSender.ts | 4 +- src/commands/erinnerung.ts | 14 +++---- src/commands/erleuchtung.ts | 6 +-- src/commands/error.ts | 4 +- src/commands/extend.ts | 20 +++++----- src/commands/faulenzerping.ts | 8 ++-- src/commands/ficktabelle.ts | 6 +-- src/commands/geburtstag.ts | 4 +- src/commands/gegenstand.ts | 24 +++++------ src/commands/geringverdiener.ts | 6 +-- src/commands/gibmirids.ts | 8 ++-- src/commands/google.ts | 4 +- src/commands/hilfe.ts | 8 ++-- src/commands/info.ts | 8 ++-- src/commands/instagram.ts | 6 +-- src/commands/inventar.ts | 16 ++++---- src/commands/invite.ts | 4 +- src/commands/karte.ts | 16 ++++---- src/commands/lauscher.ts | 18 ++++----- src/commands/metafrage.ts | 12 +++--- src/commands/min.ts | 8 ++-- src/commands/mock.ts | 8 ++-- src/commands/modcommands/assigner.ts | 6 +-- src/commands/modcommands/ban.ts | 10 ++--- src/commands/modcommands/ghostwriter.ts | 4 +- src/commands/modcommands/listroles.ts | 6 +-- src/commands/modcommands/modhilfe.ts | 12 +++--- src/commands/modcommands/unban.ts | 6 +-- src/commands/never.ts | 6 +-- src/commands/nickname.ts | 10 ++--- src/commands/nischdaaa.ts | 4 +- src/commands/oida.ts | 8 ++-- src/commands/penis.ts | 12 +++--- src/commands/poll.ts | 16 ++++---- src/commands/poll2.ts | 4 +- src/commands/roll.ts | 10 ++--- src/commands/saufen.ts | 10 ++--- src/commands/sdm.ts | 6 +-- src/commands/selfban.ts | 12 +++--- src/commands/special/keywordReact.ts | 4 +- src/commands/splid.ts | 12 +++--- src/commands/springerWarning.ts | 4 +- src/commands/stempelgraph.ts | 6 +-- src/commands/stempelkarte.ts | 6 +-- src/commands/stempeln.ts | 6 +-- src/commands/tiktok.ts | 2 +- src/commands/toggle.ts | 8 ++-- src/commands/vote.ts | 8 ++-- src/commands/vote2.ts | 4 +- src/commands/wat.ts | 2 +- src/commands/where.ts | 6 +-- src/commands/woislog.ts | 4 +- src/commands/woisvote.ts | 10 ++--- src/commands/wrapped.ts | 8 ++-- src/commands/yoink.ts | 10 ++--- src/commands/yt-dl.ts | 10 ++--- src/commands/zusammenfassung.ts | 6 +-- src/context.ts | 4 +- src/handler/ReactionHandler.ts | 2 +- src/handler/commandHandler.ts | 14 +++---- src/handler/guildMemberHandler.ts | 4 +- .../deleteThreadMessagesHandler.ts | 2 +- src/handler/messageDeleteHandler.ts | 10 ++--- src/handler/presenceHandler.ts | 4 +- .../reaction/logEmotesReactionHandler.ts | 2 +- src/handler/reaction/pollReactionHandler.ts | 6 +-- src/handler/reaction/quoteHandler.ts | 4 +- src/handler/reaction/roleAssignerHandler.ts | 2 +- src/handler/voiceHandler.ts | 4 +- src/service/aprilFools.ts | 8 ++-- src/service/bahncard.ts | 12 +++--- src/service/ban.ts | 8 ++-- src/service/banner.ts | 4 +- src/service/birthday.ts | 8 ++-- src/service/command.ts | 4 +- src/service/cron.ts | 40 +++++++++---------- src/service/delayedPollLegacy.ts | 8 ++-- src/service/ehre.ts | 2 +- src/service/emoteLogging.ts | 6 +-- src/service/fadingMessage.ts | 4 +- src/service/hatching.ts | 8 ++-- src/service/instagram.ts | 2 +- src/service/lauscher.ts | 2 +- src/service/location.ts | 6 +-- src/service/loot.ts | 6 +-- src/service/lootData.ts | 14 +++---- src/service/lootDegradation.ts | 10 ++--- src/service/lootDrop.ts | 18 ++++----- src/service/lootRoles.ts | 6 +-- src/service/nickNameRoll.ts | 6 +-- src/service/pet.ts | 6 +-- src/service/poll.ts | 14 +++---- src/service/purge.ts | 2 +- src/service/quote.ts | 2 +- src/service/splid.ts | 6 +-- src/service/stats.ts | 2 +- src/service/stempel.ts | 2 +- src/service/trichterUnser.ts | 2 +- src/service/voiceState.ts | 2 +- src/service/ytDl.ts | 2 +- src/storage/db/db.ts | 2 +- src/storage/db/model.ts | 2 +- src/storage/lauscher.ts | 2 +- src/storage/locationHistory.ts | 2 +- src/storage/loot.ts | 4 +- src/storage/penis.ts | 2 +- src/storage/quote.ts | 2 +- src/utils/ExtendedCanvasContext.ts | 2 +- src/utils/smoke.test.ts | 4 +- 126 files changed, 462 insertions(+), 462 deletions(-) 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"; From ffa450d95f06e23d5682f3c9274ce75acded5196 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 17:27:51 +0100 Subject: [PATCH 02/22] 25 --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 8cc2a27de89bdf259442264afb869f1b01fcfde3 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 17:35:45 +0100 Subject: [PATCH 03/22] Add oxlint --- package-lock.json | 371 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 7 +- 2 files changed, 374 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 91b26272..ab6ec735 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,8 @@ "@types/node-cron": "^3.0.11", "@typescript/native-preview": "^7.0.0-dev.20260219.1", "expect": "^30.2.0", - "lefthook": "^2.1.1" + "lefthook": "^2.1.1", + "oxlint": "^1.48.0" }, "engines": { "node": ">=25.6.1" @@ -1640,6 +1641,329 @@ "@opentelemetry/api": "^1.1.0" } }, + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.48.0.tgz", + "integrity": "sha512-1Pz/stJvveO9ZO7ll4ZoEY3f6j2FiUgBLBcCRCiW6ylId9L9UKs+gn3X28m3eTnoiFCkhKwmJJ+VO6vwsu7Qtg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.48.0.tgz", + "integrity": "sha512-Zc42RWGE8huo6Ht0lXKjd0NH2lWNmimQHUmD0JFcvShLOuwN+RSEE/kRakc2/0LIgOUuU/R7PaDMCOdQlPgNUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.48.0.tgz", + "integrity": "sha512-jgZs563/4vaG5jH2RSt2TSh8A2jwsFdmhLXrElMdm3Mmto0HPf85FgInLSNi9HcwzQFvkYV8JofcoUg2GH1HTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.48.0.tgz", + "integrity": "sha512-kvo87BujEUjCJREuWDC4aPh1WoXCRFFWE4C7uF6wuoMw2f6N2hypA/cHHcYn9DdL8R2RrgUZPefC8JExyeIMKA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.48.0.tgz", + "integrity": "sha512-eyzzPaHQKn0RIM+ueDfgfJF2RU//Wp4oaKs2JVoVYcM5HjbCL36+O0S3wO5Xe1NWpcZIG3cEHc/SuOCDRqZDSg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.48.0.tgz", + "integrity": "sha512-p3kSloztK7GRO7FyO3u38UCjZxQTl92VaLDsMQAq0eGoiNmeeEF1KPeE4+Fr+LSkQhF8WvJKSuls6TwOlurdPA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.48.0.tgz", + "integrity": "sha512-uWM+wiTqLW/V0ZmY/eyTWs8ykhIkzU+K2tz/8m35YepYEzohiUGRbnkpAFXj2ioXpQL+GUe5vmM3SLH6ozlfFw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.48.0.tgz", + "integrity": "sha512-OhQNPjs/OICaYqxYJjKKMaIY7p3nJ9IirXcFoHKD+CQE1BZFCeUUAknMzUeLclDCfudH9Vb/UgjFm8+ZM5puAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.48.0.tgz", + "integrity": "sha512-adu5txuwGvQ4C4fjYHJD+vnY+OCwCixBzn7J3KF3iWlVHBBImcosSv+Ye+fbMMJui4HGjifNXzonjKm9pXmOiw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.48.0.tgz", + "integrity": "sha512-inlQQRUnHCny/7b7wA6NjEoJSSZPNea4qnDhWyeqBYWx8ukf2kzNDSiamfhOw6bfAYPm/PVlkVRYaNXQbkLeTQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.48.0.tgz", + "integrity": "sha512-YiJx6sW6bYebQDZRVWLKm/Drswx/hcjIgbLIhULSn0rRcBKc7d9V6mkqPjKDbhcxJgQD5Zi0yVccJiOdF40AWA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.48.0.tgz", + "integrity": "sha512-zwSqxMgmb2ITamNfDv9Q9EKBc/4ZhCBP9gkg2hhcgR6sEVGPUDl1AKPC89CBKMxkmPUi3685C38EvqtZn5OtHw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.48.0.tgz", + "integrity": "sha512-c/+2oUWAOsQB5JTem0rW8ODlZllF6pAtGSGXoLSvPTonKI1vAwaKhD9Qw1X36jRbcI3Etkpu/9z/RRjMba8vFQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.48.0.tgz", + "integrity": "sha512-PhauDqeFW5DGed6QxCY5lXZYKSlcBdCXJnH03ZNU6QmDZ0BFM/zSy1oPT2MNb1Afx1G6yOOVk8ErjWsQ7c59ng==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.48.0.tgz", + "integrity": "sha512-6d7LIFFZGiavbHndhf1cK9kG9qmy2Dmr37sV9Ep7j3H+ciFdKSuOzdLh85mEUYMih+b+esMDlF5DU0WQRZPQjw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.48.0.tgz", + "integrity": "sha512-r+0KK9lK6vFp3tXAgDMOW32o12dxvKS3B9La1uYMGdWAMoSeu2RzG34KmzSpXu6MyLDl4aSVyZLFM8KGdEjwaw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.48.0.tgz", + "integrity": "sha512-Nkw/MocyT3HSp0OJsKPXrcbxZqSPMTYnLLfsqsoiFKoL1ppVNL65MFa7vuTxJehPlBkjy+95gUgacZtuNMECrg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.48.0.tgz", + "integrity": "sha512-reO1SpefvRmeZSP+WeyWkQd1ArxxDD1MyKgMUKuB8lNuUoxk9QEohYtKnsfsxJuFwMT0JTr7p9wZjouA85GzGQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.48.0.tgz", + "integrity": "sha512-T6zwhfcsrorqAybkOglZdPkTLlEwipbtdO1qjE+flbawvwOMsISoyiuaa7vM7zEyfq1hmDvMq1ndvkYFioranA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, "node_modules/@pinojs/redact": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz", @@ -4004,6 +4328,51 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oxlint": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.48.0.tgz", + "integrity": "sha512-m5vyVBgPtPhVCJc3xI//8je9lRc8bYuYB4R/1PH3VPGOjA4vjVhkHtyJukdEjYEjwrw4Qf1eIf+pP9xvfhfMow==", + "dev": true, + "license": "MIT", + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.48.0", + "@oxlint/binding-android-arm64": "1.48.0", + "@oxlint/binding-darwin-arm64": "1.48.0", + "@oxlint/binding-darwin-x64": "1.48.0", + "@oxlint/binding-freebsd-x64": "1.48.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.48.0", + "@oxlint/binding-linux-arm-musleabihf": "1.48.0", + "@oxlint/binding-linux-arm64-gnu": "1.48.0", + "@oxlint/binding-linux-arm64-musl": "1.48.0", + "@oxlint/binding-linux-ppc64-gnu": "1.48.0", + "@oxlint/binding-linux-riscv64-gnu": "1.48.0", + "@oxlint/binding-linux-riscv64-musl": "1.48.0", + "@oxlint/binding-linux-s390x-gnu": "1.48.0", + "@oxlint/binding-linux-x64-gnu": "1.48.0", + "@oxlint/binding-linux-x64-musl": "1.48.0", + "@oxlint/binding-openharmony-arm64": "1.48.0", + "@oxlint/binding-win32-arm64-msvc": "1.48.0", + "@oxlint/binding-win32-ia32-msvc": "1.48.0", + "@oxlint/binding-win32-x64-msvc": "1.48.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=0.12.2" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + } + } + }, "node_modules/parse-ms": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", diff --git a/package.json b/package.json index 00a70970..e80368e1 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "test": "node --require ./src/polyfills.ts --test && tsgo", "ci": "biome ci ./", "format": "biome format --write ./", - "lint": "biome lint ./", - "lint:fix": "biome check --write ./", + "lint": "oxlint ./", + "lint:fix": "oxlint --fix ./", "watch": "node --require ./src/polyfills.ts --watch src/app.ts" }, "repository": { @@ -54,7 +54,8 @@ "@types/node-cron": "^3.0.11", "@typescript/native-preview": "^7.0.0-dev.20260219.1", "expect": "^30.2.0", - "lefthook": "^2.1.1" + "lefthook": "^2.1.1", + "oxlint": "^1.48.0" }, "imports": { "#log": "./src/utils/logger.ts", From 0a4195fbf719ec4edc52d1f710bf531e18deb0c5 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 17:56:00 +0100 Subject: [PATCH 04/22] Fix docs --- lefthook.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lefthook.yml b/lefthook.yml index 6a87b88c..3a3ec1fb 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -1,4 +1,5 @@ -# Docs: https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md +# docs: https://lefthook.dev/configuration/ + pre-push: commands: lint: From 86aa578617a592f97d9b73882a7d9b63c791834e Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 17:58:37 +0100 Subject: [PATCH 05/22] Fix staged --- lefthook.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index 3a3ec1fb..c9daa3e7 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -11,11 +11,11 @@ pre-commit: commands: format: glob: "*.{js,ts,json}" - run: node --run format -- --staged + run: node --run format -- {staged_files} stage_fixed: true lint-fix: glob: "*.{js,ts,json}" - run: node --run lint:fix -- --staged + run: node --run lint:fix -- {staged_files} stage_fixed: true output: From 331d7513a2628e7c64578d427659b7af6ae53cd3 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 17:59:03 +0100 Subject: [PATCH 06/22] yml -> yaml --- lefthook.yml => lefthook.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lefthook.yml => lefthook.yaml (100%) diff --git a/lefthook.yml b/lefthook.yaml similarity index 100% rename from lefthook.yml rename to lefthook.yaml From 522683a55c9fde47fa442c06bb72de76a6c327bc Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:02:55 +0100 Subject: [PATCH 07/22] oxlint --fix --- src/commands/toggle.ts | 18 +++++++----------- src/service/ban.ts | 4 ++-- src/service/purge.ts | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/commands/toggle.ts b/src/commands/toggle.ts index 8eb8f2b8..2f96d99e 100644 --- a/src/commands/toggle.ts +++ b/src/commands/toggle.ts @@ -71,11 +71,9 @@ const togglePoll = async (message: Message) => { const embed = EmbedBuilder.from(message.embeds[0]); embed.setColor(colorToUse); - await Promise.all([ - message.edit({ - embeds: [embed], - }), - ]); + await message.edit({ + embeds: [embed], + }); }; const toggleSdm = async (message: Message) => { @@ -87,10 +85,8 @@ const toggleSdm = async (message: Message) => { const file = isYes ? "no.png" : "yes.png"; toggledEmbed.setThumbnail(`attachment://${file}`); - await Promise.all([ - message.edit({ - embeds: [toggledEmbed], - files: [`./assets/${file}`], - }), - ]); + await message.edit({ + embeds: [toggledEmbed], + files: [`./assets/${file}`], + }); }; diff --git a/src/service/ban.ts b/src/service/ban.ts index d8e587fe..3932c166 100644 --- a/src/service/ban.ts +++ b/src/service/ban.ts @@ -152,7 +152,7 @@ async function assignBannedRoles(context: BotContext, user: GuildMember): Promis return false; } - const currentRoles = [...user.roles.cache.map(r => r.id)]; + const currentRoles = user.roles.cache.map(r => r.id); let newRoles = [...currentRoles, bannedRole.id].filter(r => r !== context.roles.default.id); if (user.roles.cache.find(r => r.id === context.roles.gruendervaeter.id)) { @@ -177,7 +177,7 @@ async function restoreRoles(context: BotContext, user: GuildMember): Promise r.id)]; + const currentRoles = user.roles.cache.map(r => r.id); let newRoles = [...currentRoles, defaultRole.id].filter(r => r !== context.roles.banned.id); if (user.roles.cache.find(r => r.id === context.roles.gruendervaeterBanned.id)) { diff --git a/src/service/purge.ts b/src/service/purge.ts index 43b5b216..3185ff2a 100644 --- a/src/service/purge.ts +++ b/src/service/purge.ts @@ -46,7 +46,7 @@ export async function leetTask(context: BotContext) { ); } - await Promise.all([...membersToKick.map(member => member.kick())]); + await Promise.all(membersToKick.map(member => member.kick())); await hauptchat.send(`Hab grad ${membersToKick.size} Jocklerinos gekickt ${dabEmote}`); From 6a951c34c3c3432570fb1ada13eb39b46f91533e Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:15:10 +0100 Subject: [PATCH 08/22] Use oxlint as ci script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e80368e1..dd81e09b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "start": "node --require ./src/polyfills.ts src/app.ts", "test": "node --require ./src/polyfills.ts --test && tsgo", - "ci": "biome ci ./", + "ci": "oxlint --deny-warnings -f github ./", "format": "biome format --write ./", "lint": "oxlint ./", "lint:fix": "oxlint --fix ./", From 2c2e38ff224e584284addb01320bb9c592e1d083 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:19:23 +0100 Subject: [PATCH 09/22] Use different plugin --- .vscode/extensions.json | 2 +- .vscode/settings.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index a58add6b..bd178c67 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,6 +4,6 @@ "streetsidesoftware.code-spell-checker", "streetsidesoftware.code-spell-checker-german", "TypeScriptTeam.native-preview", - "biomejs.biome" + "oxc.oxc-vscode" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 14a579e2..c77b08fa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,10 +14,10 @@ "config*.json": "jsonc" }, "[javascript]": { - "editor.defaultFormatter": "biomejs.biome" + "editor.defaultFormatter": "oxc.oxc-vscode" }, "[typescript]": { - "editor.defaultFormatter": "biomejs.biome" + "editor.defaultFormatter": "oxc.oxc-vscode" }, "cSpell.words": [ "aehre", From 8e2ac4b927d558e8f9b0e14d59fb9b16655f61ec Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:20:44 +0100 Subject: [PATCH 10/22] type-aware --- .vscode/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c77b08fa..8f5e9f1e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,7 @@ "flake.nix": "flake.lock", "*.ts": "$(capture).test.ts,$(capture).d.ts" }, - "files.eol": "\n", + "oxc.typeAware": true, "typescript.experimental.useTsgo": false, "cSpell.language": "de,en", "editor.formatOnSaveMode": "modificationsIfAvailable", From c4b07130f14f08ae27cb5c9ae0af29b814532ac5 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:26:58 +0100 Subject: [PATCH 11/22] Add oxfmt --- package-lock.json | 538 ++++++++++++++++++++++++++++++++-------------- package.json | 140 ++++++------ 2 files changed, 444 insertions(+), 234 deletions(-) diff --git a/package-lock.json b/package-lock.json index ab6ec735..dced9c9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,6 @@ "youtube-dl-exec": "^3.1.1" }, "devDependencies": { - "@biomejs/biome": "^2.4.2", "@types/better-sqlite3": "^7.6.13", "@types/jsdom": "^27.0.0", "@types/node": "^25.3.0", @@ -39,6 +38,7 @@ "@typescript/native-preview": "^7.0.0-dev.20260219.1", "expect": "^30.2.0", "lefthook": "^2.1.1", + "oxfmt": "^0.33.0", "oxlint": "^1.48.0" }, "engines": { @@ -125,169 +125,6 @@ "node": ">=6.9.0" } }, - "node_modules/@biomejs/biome": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.2.tgz", - "integrity": "sha512-vVE/FqLxNLbvYnFDYg3Xfrh1UdFhmPT5i+yPT9GE2nTUgI4rkqo5krw5wK19YHBd7aE7J6r91RRmb8RWwkjy6w==", - "dev": true, - "license": "MIT OR Apache-2.0", - "bin": { - "biome": "bin/biome" - }, - "engines": { - "node": ">=14.21.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/biome" - }, - "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "2.4.2", - "@biomejs/cli-darwin-x64": "2.4.2", - "@biomejs/cli-linux-arm64": "2.4.2", - "@biomejs/cli-linux-arm64-musl": "2.4.2", - "@biomejs/cli-linux-x64": "2.4.2", - "@biomejs/cli-linux-x64-musl": "2.4.2", - "@biomejs/cli-win32-arm64": "2.4.2", - "@biomejs/cli-win32-x64": "2.4.2" - } - }, - "node_modules/@biomejs/cli-darwin-arm64": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.2.tgz", - "integrity": "sha512-3pEcKCP/1POKyaZZhXcxFl3+d9njmeAihZ17k8lL/1vk+6e0Cbf0yPzKItFiT+5Yh6TQA4uKvnlqe0oVZwRxCA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-darwin-x64": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.2.tgz", - "integrity": "sha512-P7hK1jLVny+0R9UwyGcECxO6sjETxfPyBm/1dmFjnDOHgdDPjPqozByunrwh4xPKld8sxOr5eAsSqal5uKgeBg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-arm64": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.2.tgz", - "integrity": "sha512-DI3Mi7GT2zYNgUTDEbSjl3e1KhoP76OjQdm8JpvZYZWtVDRyLd3w8llSr2TWk1z+U3P44kUBWY3X7H9MD1/DGQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.2.tgz", - "integrity": "sha512-/x04YK9+7erw6tYEcJv9WXoBHcULI/wMOvNdAyE9S3JStZZ9yJyV67sWAI+90UHuDo/BDhq0d96LDqGlSVv7WA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-x64": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.2.tgz", - "integrity": "sha512-GK2ErnrKpWFigYP68cXiCHK4RTL4IUWhK92AFS3U28X/nuAL5+hTuy6hyobc8JZRSt+upXt1nXChK+tuHHx4mA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.2.tgz", - "integrity": "sha512-wbBmTkeAoAYbOQ33f6sfKG7pcRSydQiF+dTYOBjJsnXO2mWEOQHllKlC2YVnedqZFERp2WZhFUoO7TNRwnwEHQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-win32-arm64": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.2.tgz", - "integrity": "sha512-k2uqwLYrNNxnaoiW3RJxoMGnbKda8FuCmtYG3cOtVljs3CzWxaTR+AoXwKGHscC9thax9R4kOrtWqWN0+KdPTw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-win32-x64": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.2.tgz", - "integrity": "sha512-9ma7C4g8Sq3cBlRJD2yrsHXB1mnnEBdpy7PhvFrylQWQb4PoyCmPucdX7frvsSBQuFtIiKCrolPl/8tCZrKvgQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=14.21.3" - } - }, "node_modules/@bramus/specificity": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.2.tgz", @@ -1641,6 +1478,329 @@ "@opentelemetry/api": "^1.1.0" } }, + "node_modules/@oxfmt/binding-android-arm-eabi": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-android-arm-eabi/-/binding-android-arm-eabi-0.33.0.tgz", + "integrity": "sha512-ML6qRW8/HiBANteqfyFAR1Zu0VrJu+6o4gkPLsssq74hQ7wDMkufBYJXI16PGSERxEYNwKxO5fesCuMssgTv9w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-android-arm64": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-android-arm64/-/binding-android-arm64-0.33.0.tgz", + "integrity": "sha512-WimmcyrGpTOntj7F7CO9RMssncOKYall93nBnzJbI2ZZDhVRuCkvFwTpwz80cZqwYm5udXRXfF40ZXcCxjp9jg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-darwin-arm64": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-darwin-arm64/-/binding-darwin-arm64-0.33.0.tgz", + "integrity": "sha512-PorspsX9O5ISstVaq34OK4esN0LVcuU4DVg+XuSqJsfJ//gn6z6WH2Tt7s0rTQaqEcp76g7+QdWQOmnJDZsEVg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-darwin-x64": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-darwin-x64/-/binding-darwin-x64-0.33.0.tgz", + "integrity": "sha512-8278bqQtOcHRPhhzcqwN9KIideut+cftBjF8d2TOsSQrlsJSFx41wCCJ38mFmH9NOmU1M+x9jpeobHnbRP1okw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-freebsd-x64": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-freebsd-x64/-/binding-freebsd-x64-0.33.0.tgz", + "integrity": "sha512-BiqYVwWFHLf5dkfg0aCKsXa9rpi//vH1+xePCpd7Ulz9yp9pJKP4DWgS5g+OW8MaqOtt7iyAszhxtk/j1nDKHQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-arm-gnueabihf": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.33.0.tgz", + "integrity": "sha512-oAVmmurXx0OKbNOVv71oK92LsF1LwYWpnhDnX0VaAy/NLsCKf4B7Zo7lxkJh80nfhU20TibcdwYfoHVaqlStPQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-arm-musleabihf": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.33.0.tgz", + "integrity": "sha512-YB6S8CiRol59oRxnuclJiWoV6l+l8ru/NsuQNYjXZnnPXfSTXKtMLWHCnL/figpCFYA1E7JyjrBbar1qxe2aZg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-arm64-gnu": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.33.0.tgz", + "integrity": "sha512-hrYy+FpWoB6N24E9oGRimhVkqlls9yeqcRmQakEPUHoAbij6rYxsHHYIp3+FHRiQZFAOUxWKn/CCQoy/Mv3Dgw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-arm64-musl": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.33.0.tgz", + "integrity": "sha512-O1YIzymGRdWj9cG5iVTjkP7zk9/hSaVN8ZEbqMnWZjLC1phXlv54cUvANGGXndgJp2JS4W9XENn7eo5I4jZueg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-ppc64-gnu": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.33.0.tgz", + "integrity": "sha512-2lrkNe+B0w1tCgQTaozfUNQCYMbqKKCGcnTDATmWCZzO77W2sh+3n04r1lk9Q1CK3bI+C3fPwhFPUR2X2BvlyQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-riscv64-gnu": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.33.0.tgz", + "integrity": "sha512-8DSG1q0M6097vowHAkEyHnKed75/BWr1IBtgCJfytnWQg+Jn1X4DryhfjqonKZOZiv74oFQl5J8TCbdDuXXdtQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-riscv64-musl": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.33.0.tgz", + "integrity": "sha512-eWaxnpPz7+p0QGUnw7GGviVBDOXabr6Cd0w7S/vnWTqQo9z1VroT7XXFnJEZ3dBwxMB9lphyuuYi/GLTCxqxlg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-s390x-gnu": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.33.0.tgz", + "integrity": "sha512-+mH8cQTqq+Tu2CdoB2/Wmk9CqotXResi+gPvXpb+AAUt/LiwpicTQqSolMheQKogkDTYHPuUiSN23QYmy7IXNQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-x64-gnu": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.33.0.tgz", + "integrity": "sha512-fjyslAYAPE2+B6Ckrs5LuDQ6lB1re5MumPnzefAXsen3JGwiRilra6XdjUmszTNoExJKbewoxxd6bcLSTpkAJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-x64-musl": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-x64-musl/-/binding-linux-x64-musl-0.33.0.tgz", + "integrity": "sha512-ve/jGBlTt35Jl/I0A0SfCQX3wKnadzPDdyOFEwe2ZgHHIT9uhqhAv1PaVXTenSBpauICEWYH8mWy+ittzlVE/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-openharmony-arm64": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-openharmony-arm64/-/binding-openharmony-arm64-0.33.0.tgz", + "integrity": "sha512-lsWRgY9e+uPvwXnuDiJkmJ2Zs3XwwaQkaALJ3/SXU9kjZP0Qh8/tGW8Tk/Z6WL32sDxx+aOK5HuU7qFY9dHJhg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-win32-arm64-msvc": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.33.0.tgz", + "integrity": "sha512-w8AQHyGDRZutxtQ7IURdBEddwFrtHQiG6+yIFpNJ4HiMyYEqeAWzwBQBfwSAxtSNh6Y9qqbbc1OM2mHN6AB3Uw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-win32-ia32-msvc": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.33.0.tgz", + "integrity": "sha512-j2X4iumKVwDzQtUx3JBDkaydx6eLuncgUZPl2ybZ8llxJMFbZIniws70FzUQePMfMtzLozIm7vo4bjkvQFsOzw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-win32-x64-msvc": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.33.0.tgz", + "integrity": "sha512-lsBQxbepASwOBUh3chcKAjU+jVAQhLElbPYiagIq26cU8vA9Bttj6t20bMvCQCw31m440IRlNhrK7NpnUI8mzA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, "node_modules/@oxlint/binding-android-arm-eabi": { "version": "1.48.0", "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.48.0.tgz", @@ -4328,6 +4488,46 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oxfmt": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/oxfmt/-/oxfmt-0.33.0.tgz", + "integrity": "sha512-ogxBXA9R4BFeo8F1HeMIIxHr5kGnQwKTYZ5k131AEGOq1zLxInNhvYSpyRQ+xIXVMYfCN7yZHKff/lb5lp4auQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinypool": "2.1.0" + }, + "bin": { + "oxfmt": "bin/oxfmt" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxfmt/binding-android-arm-eabi": "0.33.0", + "@oxfmt/binding-android-arm64": "0.33.0", + "@oxfmt/binding-darwin-arm64": "0.33.0", + "@oxfmt/binding-darwin-x64": "0.33.0", + "@oxfmt/binding-freebsd-x64": "0.33.0", + "@oxfmt/binding-linux-arm-gnueabihf": "0.33.0", + "@oxfmt/binding-linux-arm-musleabihf": "0.33.0", + "@oxfmt/binding-linux-arm64-gnu": "0.33.0", + "@oxfmt/binding-linux-arm64-musl": "0.33.0", + "@oxfmt/binding-linux-ppc64-gnu": "0.33.0", + "@oxfmt/binding-linux-riscv64-gnu": "0.33.0", + "@oxfmt/binding-linux-riscv64-musl": "0.33.0", + "@oxfmt/binding-linux-s390x-gnu": "0.33.0", + "@oxfmt/binding-linux-x64-gnu": "0.33.0", + "@oxfmt/binding-linux-x64-musl": "0.33.0", + "@oxfmt/binding-openharmony-arm64": "0.33.0", + "@oxfmt/binding-win32-arm64-msvc": "0.33.0", + "@oxfmt/binding-win32-ia32-msvc": "0.33.0", + "@oxfmt/binding-win32-x64-msvc": "0.33.0" + } + }, "node_modules/oxlint": { "version": "1.48.0", "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.48.0.tgz", @@ -4945,6 +5145,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/tinypool": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-2.1.0.tgz", + "integrity": "sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.0.0 || >=22.0.0" + } + }, "node_modules/tinyspawn": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/tinyspawn/-/tinyspawn-1.5.4.tgz", diff --git a/package.json b/package.json index dd81e09b..8cce7eeb 100644 --- a/package.json +++ b/package.json @@ -1,72 +1,72 @@ { - "name": "csz-bot", - "private": true, - "version": "0.1.0", - "description": "Offizieller Bot der Coding Shitpost Zentrale", - "module": "src/app.ts", - "type": "module", - "scripts": { - "start": "node --require ./src/polyfills.ts src/app.ts", - "test": "node --require ./src/polyfills.ts --test && tsgo", - "ci": "oxlint --deny-warnings -f github ./", - "format": "biome format --write ./", - "lint": "oxlint ./", - "lint:fix": "oxlint --fix ./", - "watch": "node --require ./src/polyfills.ts --watch src/app.ts" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/NullDev/CSZ-Bot.git" - }, - "author": "Users of the CSZ", - "license": "MIT", - "bugs": { - "url": "https://github.com/NullDev/CSZ-Bot/issues" - }, - "homepage": "https://github.com/NullDev/CSZ-Bot#readme", - "dependencies": { - "@discordjs/voice": "^0.19.0", - "@js-temporal/polyfill": "^0.5.1", - "@napi-rs/canvas": "0.1.93", - "@resvg/resvg-js": "^2.6.2", - "@sentry/node": "^10.39.0", - "@snazzah/davey": "^0.1.9", - "@spotify/web-api-ts-sdk": "^1.2.0", - "chrono-node": "^2.9.0", - "comment-json": "^4.5.1", - "croner": "^10.0.1", - "discord.js": "^14.25.1", - "get-audio-duration": "^4.0.1", - "graphviz-wasm": "^3.0.2", - "jsdom": "^28.1.0", - "kysely": "^0.28.11", - "libsodium-wrappers": "^0.8.2", - "pino": "^10.3.1", - "pino-pretty": "^13.1.3", - "splid-js": "^1.5.3", - "youtube-dl-exec": "^3.1.1" - }, - "devDependencies": { - "@biomejs/biome": "^2.4.2", - "@types/better-sqlite3": "^7.6.13", - "@types/jsdom": "^27.0.0", - "@types/node": "^25.3.0", - "@types/node-cron": "^3.0.11", - "@typescript/native-preview": "^7.0.0-dev.20260219.1", - "expect": "^30.2.0", - "lefthook": "^2.1.1", - "oxlint": "^1.48.0" - }, - "imports": { - "#log": "./src/utils/logger.ts", - "#db": "./src/storage/db/db.ts", - "#/*": "./src/*" - }, - "trustedDependencies": [ - "@biomejs/biome", - "lefthook" - ], - "engines": { - "node": ">=25.6.1" - } + "name": "csz-bot", + "version": "0.1.0", + "private": true, + "description": "Offizieller Bot der Coding Shitpost Zentrale", + "homepage": "https://github.com/NullDev/CSZ-Bot#readme", + "bugs": { + "url": "https://github.com/NullDev/CSZ-Bot/issues" + }, + "license": "MIT", + "author": "Users of the CSZ", + "repository": { + "type": "git", + "url": "git+https://github.com/NullDev/CSZ-Bot.git" + }, + "type": "module", + "module": "src/app.ts", + "imports": { + "#log": "./src/utils/logger.ts", + "#db": "./src/storage/db/db.ts", + "#/*": "./src/*" + }, + "scripts": { + "start": "node --require ./src/polyfills.ts src/app.ts", + "test": "node --require ./src/polyfills.ts --test && tsgo", + "ci": "oxlint --deny-warnings -f github ./ && oxfmt --check -f github ./", + "format": "oxfmt ./", + "lint": "oxlint ./", + "lint:fix": "oxlint --fix ./", + "watch": "node --require ./src/polyfills.ts --watch src/app.ts" + }, + "dependencies": { + "@discordjs/voice": "^0.19.0", + "@js-temporal/polyfill": "^0.5.1", + "@napi-rs/canvas": "0.1.93", + "@resvg/resvg-js": "^2.6.2", + "@sentry/node": "^10.39.0", + "@snazzah/davey": "^0.1.9", + "@spotify/web-api-ts-sdk": "^1.2.0", + "chrono-node": "^2.9.0", + "comment-json": "^4.5.1", + "croner": "^10.0.1", + "discord.js": "^14.25.1", + "get-audio-duration": "^4.0.1", + "graphviz-wasm": "^3.0.2", + "jsdom": "^28.1.0", + "kysely": "^0.28.11", + "libsodium-wrappers": "^0.8.2", + "pino": "^10.3.1", + "pino-pretty": "^13.1.3", + "splid-js": "^1.5.3", + "youtube-dl-exec": "^3.1.1" + }, + "devDependencies": { + "@types/better-sqlite3": "^7.6.13", + "@types/jsdom": "^27.0.0", + "@types/node": "^25.3.0", + "@types/node-cron": "^3.0.11", + "@typescript/native-preview": "^7.0.0-dev.20260219.1", + "expect": "^30.2.0", + "lefthook": "^2.1.1", + "oxfmt": "^0.33.0", + "oxlint": "^1.48.0" + }, + "engines": { + "node": ">=25.6.1" + }, + "trustedDependencies": [ + "@biomejs/biome", + "lefthook" + ] } From de48745aab8ac4765b833869a49fc1c3adfa4d3e Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:27:23 +0100 Subject: [PATCH 12/22] Add oxfmt config --- .oxfmtrc.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .oxfmtrc.json diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 00000000..70498188 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,6 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "ignorePatterns": [], + "printWidth": 100, + "tabWidth": 4 +} From 547da1eb32ca5232aec8f0da6e726fab97ab8c3d Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:32:51 +0100 Subject: [PATCH 13/22] Format yaml --- .editorconfig | 4 ++++ .github/workflows/CD.yaml | 5 ++--- .github/workflows/CI.yaml | 11 ++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.editorconfig b/.editorconfig index 661870fb..e261a0df 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,3 +13,7 @@ indent_size = 4 [package.json] indent_style = space indent_size = 2 + +[*.{yaml,yml}] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/CD.yaml b/.github/workflows/CD.yaml index bc0e66fe..d82fa7d1 100644 --- a/.github/workflows/CD.yaml +++ b/.github/workflows/CD.yaml @@ -3,8 +3,8 @@ name: CD on: workflow_dispatch: workflow_run: - workflows: [ "CI" ] - branches: [ master ] + workflows: ["CI"] + branches: [master] types: - completed @@ -38,7 +38,6 @@ jobs: target: ${{ env.BOT_HOME_DIR }} overwrite: true - - name: Deploy CSZ Bot uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 env: diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index f4e58baf..086aceb4 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -2,21 +2,19 @@ name: CI on: pull_request: - branches: [ master ] + branches: [master] push: - branches: [ master ] + branches: [master] env: DOCKER_BUILDKIT: "1" jobs: - lint: - strategy: fail-fast: false matrix: - platform: [ "ubuntu-slim", "windows-latest", "macos-latest" ] + platform: ["ubuntu-slim", "windows-latest", "macos-latest"] name: Lint runs-on: ${{ matrix.platform }} @@ -91,7 +89,6 @@ jobs: echo "first=$first" >> "$GITHUB_OUTPUT" - - name: Build and export uses: docker/build-push-action@v6 id: build @@ -115,7 +112,7 @@ jobs: if: ${{ !github.event.repository.fork }} - needs: [ build ] + needs: [build] concurrency: e2e environment: From 81645d5b55af73cd5ab4174ee568853ccd2bc311 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:33:28 +0100 Subject: [PATCH 14/22] Format package.json --- package.json | 140 +++++++++++++++++++++++++-------------------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/package.json b/package.json index 8cce7eeb..b238936a 100644 --- a/package.json +++ b/package.json @@ -1,72 +1,72 @@ { - "name": "csz-bot", - "version": "0.1.0", - "private": true, - "description": "Offizieller Bot der Coding Shitpost Zentrale", - "homepage": "https://github.com/NullDev/CSZ-Bot#readme", - "bugs": { - "url": "https://github.com/NullDev/CSZ-Bot/issues" - }, - "license": "MIT", - "author": "Users of the CSZ", - "repository": { - "type": "git", - "url": "git+https://github.com/NullDev/CSZ-Bot.git" - }, - "type": "module", - "module": "src/app.ts", - "imports": { - "#log": "./src/utils/logger.ts", - "#db": "./src/storage/db/db.ts", - "#/*": "./src/*" - }, - "scripts": { - "start": "node --require ./src/polyfills.ts src/app.ts", - "test": "node --require ./src/polyfills.ts --test && tsgo", - "ci": "oxlint --deny-warnings -f github ./ && oxfmt --check -f github ./", - "format": "oxfmt ./", - "lint": "oxlint ./", - "lint:fix": "oxlint --fix ./", - "watch": "node --require ./src/polyfills.ts --watch src/app.ts" - }, - "dependencies": { - "@discordjs/voice": "^0.19.0", - "@js-temporal/polyfill": "^0.5.1", - "@napi-rs/canvas": "0.1.93", - "@resvg/resvg-js": "^2.6.2", - "@sentry/node": "^10.39.0", - "@snazzah/davey": "^0.1.9", - "@spotify/web-api-ts-sdk": "^1.2.0", - "chrono-node": "^2.9.0", - "comment-json": "^4.5.1", - "croner": "^10.0.1", - "discord.js": "^14.25.1", - "get-audio-duration": "^4.0.1", - "graphviz-wasm": "^3.0.2", - "jsdom": "^28.1.0", - "kysely": "^0.28.11", - "libsodium-wrappers": "^0.8.2", - "pino": "^10.3.1", - "pino-pretty": "^13.1.3", - "splid-js": "^1.5.3", - "youtube-dl-exec": "^3.1.1" - }, - "devDependencies": { - "@types/better-sqlite3": "^7.6.13", - "@types/jsdom": "^27.0.0", - "@types/node": "^25.3.0", - "@types/node-cron": "^3.0.11", - "@typescript/native-preview": "^7.0.0-dev.20260219.1", - "expect": "^30.2.0", - "lefthook": "^2.1.1", - "oxfmt": "^0.33.0", - "oxlint": "^1.48.0" - }, - "engines": { - "node": ">=25.6.1" - }, - "trustedDependencies": [ - "@biomejs/biome", - "lefthook" - ] + "name": "csz-bot", + "version": "0.1.0", + "private": true, + "description": "Offizieller Bot der Coding Shitpost Zentrale", + "homepage": "https://github.com/NullDev/CSZ-Bot#readme", + "bugs": { + "url": "https://github.com/NullDev/CSZ-Bot/issues" + }, + "license": "MIT", + "author": "Users of the CSZ", + "repository": { + "type": "git", + "url": "git+https://github.com/NullDev/CSZ-Bot.git" + }, + "type": "module", + "module": "src/app.ts", + "imports": { + "#log": "./src/utils/logger.ts", + "#db": "./src/storage/db/db.ts", + "#/*": "./src/*" + }, + "scripts": { + "start": "node --require ./src/polyfills.ts src/app.ts", + "test": "node --require ./src/polyfills.ts --test && tsgo", + "ci": "oxlint --deny-warnings -f github ./ && oxfmt --check -f github ./", + "format": "oxfmt ./", + "lint": "oxlint ./", + "lint:fix": "oxlint --fix ./", + "watch": "node --require ./src/polyfills.ts --watch src/app.ts" + }, + "dependencies": { + "@discordjs/voice": "^0.19.0", + "@js-temporal/polyfill": "^0.5.1", + "@napi-rs/canvas": "0.1.93", + "@resvg/resvg-js": "^2.6.2", + "@sentry/node": "^10.39.0", + "@snazzah/davey": "^0.1.9", + "@spotify/web-api-ts-sdk": "^1.2.0", + "chrono-node": "^2.9.0", + "comment-json": "^4.5.1", + "croner": "^10.0.1", + "discord.js": "^14.25.1", + "get-audio-duration": "^4.0.1", + "graphviz-wasm": "^3.0.2", + "jsdom": "^28.1.0", + "kysely": "^0.28.11", + "libsodium-wrappers": "^0.8.2", + "pino": "^10.3.1", + "pino-pretty": "^13.1.3", + "splid-js": "^1.5.3", + "youtube-dl-exec": "^3.1.1" + }, + "devDependencies": { + "@types/better-sqlite3": "^7.6.13", + "@types/jsdom": "^27.0.0", + "@types/node": "^25.3.0", + "@types/node-cron": "^3.0.11", + "@typescript/native-preview": "^7.0.0-dev.20260219.1", + "expect": "^30.2.0", + "lefthook": "^2.1.1", + "oxfmt": "^0.33.0", + "oxlint": "^1.48.0" + }, + "engines": { + "node": ">=25.6.1" + }, + "trustedDependencies": [ + "@biomejs/biome", + "lefthook" + ] } From 9db16c8d20befbdbb60182ab270aa25104072cf3 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:37:20 +0100 Subject: [PATCH 15/22] Add config --- .oxfmtrc.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 70498188..6e681bbc 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -1,6 +1,5 @@ { "$schema": "./node_modules/oxfmt/configuration_schema.json", - "ignorePatterns": [], - "printWidth": 100, - "tabWidth": 4 + "ignorePatterns": ["*.md"], + "arrowParens": "avoid" } From d313455afb47797efa470f411a55465ccf2a86c1 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:39:04 +0100 Subject: [PATCH 16/22] Faster call --- src/polyfills.ts | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/polyfills.ts b/src/polyfills.ts index 2a344139..c7787152 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -27,11 +27,13 @@ if (typeof Math.sumPrecise !== "function") { // https://github.com/tc39/proposal-upsert if (typeof Map.prototype.getOrInsert === "undefined") { Map.prototype.getOrInsert = function (this: Map, key: K, defaultValue: V): V { - if (!this.has(key)) { - this.set(key, defaultValue); + const v = this.get(key); + if (v !== undefined) { + return v; } - // biome-ignore lint/style/noNonNullAssertion: inserted bevore - return this.get(key)!; + + this.set(key, defaultValue); + return defaultValue; }; } if (typeof Map.prototype.getOrInsertComputed === "undefined") { @@ -40,10 +42,13 @@ if (typeof Map.prototype.getOrInsertComputed === "undefined") { key: K, callbackFunction: (key: K) => V, ): V { - if (!this.has(key)) { - this.set(key, callbackFunction(key)); + const v = this.get(key); + if (v !== undefined) { + return v; } - // biome-ignore lint/style/noNonNullAssertion: inserted before - return this.get(key)!; + + const defaultValue = callbackFunction(key); + this.set(key, defaultValue); + return defaultValue; }; } From ef618439e7feb9238e005ebf79384ac9b859ad4e Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:40:01 +0100 Subject: [PATCH 17/22] Fix devcontainer --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 41810cf1..13986cdd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,7 +7,7 @@ "editorconfig.editorconfig", "streetsidesoftware.code-spell-checker", "streetsidesoftware.code-spell-checker-german", - "biomejs.biome" + "oxc.oxc-vscode" ] } }, From ed02e01d93e67e2604b000512514ba3ba9993ce9 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:46:49 +0100 Subject: [PATCH 18/22] Remove old config --- .dockerignore | 2 +- biome.json | 51 --------------------------------------------------- 2 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 biome.json diff --git a/.dockerignore b/.dockerignore index 377e2dc8..496ca14e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -10,7 +10,7 @@ node_modules *.md compose.yaml logs -biome.json +.oxfmtrc.json LICENSE flake.* shell.nix diff --git a/biome.json b/biome.json deleted file mode 100644 index e9593a1d..00000000 --- a/biome.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json", - "assist": { - "actions": { - "source": { - "organizeImports": "off" - } - } - }, - "formatter": { - "enabled": true, - "useEditorconfig": true, - "lineWidth": 100 - }, - "vcs": { - "enabled": true, - "clientKind": "git", - "useIgnoreFile": true - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true, - "nursery": { - "noFloatingPromises": "error" - } - } - }, - "javascript": { - "formatter": { - "arrowParentheses": "asNeeded" - } - }, - "json": { - "parser": { - "allowComments": true - } - }, - "overrides": [ - { - "includes": ["**/src/storage/migrations/**"], - "linter": { - "rules": { - "suspicious": { - "noExplicitAny": "off" - } - } - } - } - ] -} From d34765b0b9a98aa309cd653b92e32ddd46ca8a04 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 18:53:30 +0100 Subject: [PATCH 19/22] Remove format --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 831b2eb0..dae4cf52 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "scripts": { "start": "node --require ./src/polyfills.ts src/app.ts", "test": "node --require ./src/polyfills.ts --test && tsgo", - "ci": "oxlint --deny-warnings -f github ./ && oxfmt --check -f github ./", + "ci": "oxlint --deny-warnings -f github ./ && oxfmt --check ./", "format": "oxfmt ./", "lint": "oxlint ./", "lint:fix": "oxlint --fix ./", From b3e7a1805ad5b244f4fa6373c1d75bc222f2acb1 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 19:01:51 +0100 Subject: [PATCH 20/22] Try to fix windows --- .editorconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/.editorconfig b/.editorconfig index e261a0df..d51d38f1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,5 +15,6 @@ indent_style = space indent_size = 2 [*.{yaml,yml}] +end_of_line = lf indent_style = space indent_size = 2 From df269e99c18f4700ef392737e6f17fadff4d27b0 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 19:06:31 +0100 Subject: [PATCH 21/22] Use default dir --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index dae4cf52..6aff015d 100644 --- a/package.json +++ b/package.json @@ -23,10 +23,10 @@ "scripts": { "start": "node --require ./src/polyfills.ts src/app.ts", "test": "node --require ./src/polyfills.ts --test && tsgo", - "ci": "oxlint --deny-warnings -f github ./ && oxfmt --check ./", - "format": "oxfmt ./", - "lint": "oxlint ./", - "lint:fix": "oxlint --fix ./", + "ci": "oxlint --deny-warnings -f github && oxfmt --check", + "format": "oxfmt", + "lint": "oxlint", + "lint:fix": "oxlint --fix", "watch": "node --require ./src/polyfills.ts --watch src/app.ts" }, "dependencies": { From a841956789a975bb6e583ef8dec51e03bb2902db Mon Sep 17 00:00:00 2001 From: holzmaster Date: Thu, 19 Feb 2026 19:10:25 +0100 Subject: [PATCH 22/22] Skip oxfmt for windows --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6aff015d..dae74691 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "scripts": { "start": "node --require ./src/polyfills.ts src/app.ts", "test": "node --require ./src/polyfills.ts --test && tsgo", - "ci": "oxlint --deny-warnings -f github && oxfmt --check", + "ci": "oxlint --deny-warnings -f github", "format": "oxfmt", "lint": "oxlint", "lint:fix": "oxlint --fix",