Something went wrong. Try again.
A Discord bot that does Osu renders with Danser. Not built for scale, but instead small friend-group servers.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334import type { ChatInputCommandInteraction, SlashCommandBuilder, SlashCommandOptionsOnlyBuilder, SlashCommandSubcommandsOnlyBuilder,} from "discord.js";import type { Database } from "./db/types.ts";import type { BeatmapMirrors } from "./libs/beatmap-mirrors/index.ts";import type { OsuApi } from "./libs/osu-api/index.ts";
/**Long-lived clients a command may need, built once at startup.*/export interface Services { db: Database; osuApi: OsuApi; mirrors: BeatmapMirrors; /** Directory for per-render scratch files; each render makes its own subdirectory. */ workDirectory: string;}
export interface Command { definition: | SlashCommandBuilder | SlashCommandOptionsOnlyBuilder | SlashCommandSubcommandsOnlyBuilder; execute: ( interaction: ChatInputCommandInteraction, services: Services, ) => Promise<void>;}