diff --git a/server/commands/closepoll.ts b/server/commands/closepoll.ts index fea96fe..756d1bc 100644 --- a/server/commands/closepoll.ts +++ b/server/commands/closepoll.ts @@ -3,12 +3,12 @@ import { Guild, GuildScheduledEvent, GuildScheduledEventEditOptions, GuildSchedu import { v4 as uuid } from 'uuid' import { client } from '../..' import { config } from '../configuration' -import { Emotes } from '../events/autoCreateVoteByWPEvent' import { Maybe } from '../interfaces' import { logger } from '../logger' import { Command } from '../structures/command' import { RunOptions } from '../types/commandTypes' import { messageIsVoteEndedMessage, messageIsVoteMessage } from '../helper/messageIdentifiers' +import { Emotes } from '../constants' export default new Command({ name: 'closepoll', diff --git a/server/constants.ts b/server/constants.ts new file mode 100644 index 0000000..d60b4a9 --- /dev/null +++ b/server/constants.ts @@ -0,0 +1,3 @@ + +export enum Emotes { "1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣", "🔟" } +export const NONE_OF_THAT = "❌" diff --git a/server/events/autoCreateVoteByWPEvent.ts b/server/events/autoCreateVoteByWPEvent.ts index 8ccdddb..323556d 100644 --- a/server/events/autoCreateVoteByWPEvent.ts +++ b/server/events/autoCreateVoteByWPEvent.ts @@ -6,14 +6,12 @@ import { config } from "../configuration"; import { createDateStringFromEvent } from "../helper/dateHelper"; import { Maybe } from "../interfaces"; import { logger } from "../logger"; +import { Emotes, NONE_OF_THAT } from "../constants"; export const name = 'guildScheduledEventCreate' -export enum Emotes { "1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣", "🔟" } -export const NONE_OF_THAT = "❌" -export let task: ScheduledTask | undefined export async function execute(event: GuildScheduledEvent) { const requestId = uuid()