add votecontroller to consolidate handling of votes

This commit is contained in:
2023-06-26 23:47:43 +02:00
parent d9d1d74ef9
commit e8dcfd8340
2 changed files with 35 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import { logger } from "../logger";
import { CommandType } from "../types/commandTypes";
import { checkForPollsToClose } from "../commands/closepoll";
import { messageIsInitialAnnouncement } from "../helper/messageIdentifiers";
import VoteController from "../helper/vote.controller";
@ -17,6 +18,7 @@ export class ExtendedClient extends Client {
private eventFilePath = `${__dirname}/../events`
private commandFilePath = `${__dirname}/../commands`
private jellyfin: JellyfinHandler
public VoteController: VoteController = new VoteController()
public commands: Collection<string, CommandType> = new Collection()
private announcementChannels: Collection<string, TextChannel> = new Collection() //guildId to TextChannel
private announcementRoleHandlerTask: Collection<string, ScheduledTask> = new Collection() //one task per guild