diff --git a/server/commands/closepoll.ts b/server/commands/closepoll.ts index ff3dfd8..8d0a3ba 100644 --- a/server/commands/closepoll.ts +++ b/server/commands/closepoll.ts @@ -3,7 +3,7 @@ import { Guild, GuildScheduledEvent, GuildScheduledEventEditOptions, GuildSchedu import { v4 as uuid } from 'uuid' import { client } from '../..' import { config } from '../configuration' -import { Emotes } from '../events/guildScheduledEventCreate' +import { Emotes } from '../events/autoCreateVoteByWPEvent' import { Maybe } from '../interfaces' import { logger } from '../logger' import { Command } from '../structures/command' diff --git a/server/events/announceManualWatchparty.ts b/server/events/announceManualWatchparty.ts new file mode 100644 index 0000000..e5b0e8f --- /dev/null +++ b/server/events/announceManualWatchparty.ts @@ -0,0 +1,26 @@ +import { format } from "date-fns"; +import { GuildScheduledEvent, Message, MessageCreateOptions, TextChannel } from "discord.js"; +import { ScheduledTask } from "node-cron"; +import { v4 as uuid } from "uuid"; +import { client, yavinJellyfinHandler } from "../.."; +import { config } from "../configuration"; +import { Maybe } from "../interfaces"; +import { logger } from "../logger"; + + +export const name = 'guildScheduledEventCreate' + +export async function execute(event: GuildScheduledEvent) { + const guildId = event.guildId + const requestId = uuid() + + if(event.description?.includes("!wp")) { + logger.info("Got manual create event of watchparty event!") + + + + + + } + +} \ No newline at end of file diff --git a/server/events/guildScheduledEventCreate.ts b/server/events/autoCreateVoteByWPEvent.ts similarity index 96% rename from server/events/guildScheduledEventCreate.ts rename to server/events/autoCreateVoteByWPEvent.ts index 74071b2..5ea0e5f 100644 --- a/server/events/guildScheduledEventCreate.ts +++ b/server/events/autoCreateVoteByWPEvent.ts @@ -17,8 +17,7 @@ export let task: ScheduledTask | undefined export async function execute(event: GuildScheduledEvent) { const requestId = uuid() - logger.debug(`New event created: ${JSON.stringify(event, null, 2)}`, { guildId: event.guildId, requestId }) - + if (event.name.toLowerCase().includes("!nextwp")) { logger.info("Event was a placeholder event to start a new watchparty and voting. Creating vote!", { guildId: event.guildId, requestId }) logger.debug("Renaming event", { guildId: event.guildId, requestId }) diff --git a/server/events/guildMemberUpdate.ts b/server/events/handlePermJFAccountByRole.ts similarity index 100% rename from server/events/guildMemberUpdate.ts rename to server/events/handlePermJFAccountByRole.ts diff --git a/server/events/voiceStateUpdate.ts b/server/events/handleTempJFUserByVoiceEvent.ts similarity index 100% rename from server/events/voiceStateUpdate.ts rename to server/events/handleTempJFUserByVoiceEvent.ts diff --git a/server/events/guildScheduledEventUpdate.ts b/server/events/handleTempJFUsersByWPEvents.ts similarity index 100% rename from server/events/guildScheduledEventUpdate.ts rename to server/events/handleTempJFUsersByWPEvents.ts