refactor(menu): Made sure the menu can be used for more than group

This commit is contained in:
Michel Fedde 2025-06-20 17:48:00 +02:00
parent a79898b2e9
commit 1d73ee8a78
16 changed files with 650 additions and 406 deletions

View file

@ -32,11 +32,14 @@ export class Services {
const database = new DatabaseConnection(env.database);
container.set<DatabaseConnection>(database);
const eventHandler = new EventHandler();
container.set<EventHandler>(eventHandler);
const restClient = new REST();
const commands = new Commands();
const discordClient = new DiscordClient(
env.discord.clientId,
new InteractionRouter(commands, logger),
new InteractionRouter(commands, logger, eventHandler),
new CommandDeployer(env.discord.clientId, restClient, commands, logger),
logger,
restClient
@ -46,7 +49,6 @@ export class Services {
const iconCache = new IconCache(discordClient);
container.set<IconCache>(iconCache);
container.set<EventHandler>(new EventHandler());
this.setupRepositories(container);
}