feat(polls): implement polls, fun and statistics commands
A poll must end even when nobody is there to close it, so a scheduler reads the stored end dates and finalises the results at startup and while running.
This commit is contained in:
6 files changed
+514
-14
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { ActivityType, Events } from 'discord.js';
|
||||
import { createLogger } from '../core/logger.js';
|
||||
import { startPollScheduler } from '../services/polls/poll-service.js';
|
||||
|
||||
const log = createLogger('discord');
|
||||
|
||||
@@ -8,6 +9,7 @@ export const once = true;
|
||||
|
||||
export async function execute(client) {
|
||||
client.user.setActivity('FWS Arch', { type: ActivityType.Watching });
|
||||
startPollScheduler(client);
|
||||
log.info(`Connected as ${client.user.tag}`, {
|
||||
guilds: client.guilds.cache.size,
|
||||
commands: client.commands.size,
|
||||
|
||||
Reference in new issue
Block a user