From e8c58d5ff82e2c164e07282b201a063f3ea38ea8 Mon Sep 17 00:00:00 2001 From: Sammy Date: Thu, 22 Jun 2023 19:35:47 +0200 Subject: [PATCH 1/2] add event box to create message --- server/events/guildScheduledEventCreate.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/events/guildScheduledEventCreate.ts b/server/events/guildScheduledEventCreate.ts index 1d61636..74071b2 100644 --- a/server/events/guildScheduledEventCreate.ts +++ b/server/events/guildScheduledEventCreate.ts @@ -6,7 +6,6 @@ import { client, yavinJellyfinHandler } from "../.."; import { config } from "../configuration"; import { Maybe } from "../interfaces"; import { logger } from "../logger"; -import { SemanticClassificationFormat } from "typescript"; export const name = 'guildScheduledEventCreate' @@ -42,7 +41,7 @@ export async function execute(event: GuildScheduledEvent) { } const date = format(event.scheduledStartAt, "dd.MM") const time = format(event.scheduledStartAt, "HH:mm") - let message = `[Abstimmung]\n<@&${config.bot.announcement_role}> Es gibt eine neue Abstimmung für die nächste Watchparty am ${date} um ${time}! Stimme hierunter für den nächsten Film ab!\n` + let message = `[Abstimmung] für https://discord.com/events/${event.guildId}/${event.id}\n<@&${config.bot.announcement_role}> Es gibt eine neue Abstimmung für die nächste Watchparty am ${date} um ${time}! Stimme hierunter für den nächsten Film ab!\n` for (let i = 0; i < movies.length; i++) { message = message.concat(Emotes[i]).concat(": ").concat(movies[i]).concat("\n") @@ -51,7 +50,7 @@ export async function execute(event: GuildScheduledEvent) { const options: MessageCreateOptions = { allowedMentions: { parse: ["roles"]}, - content: message + content: message, } const sentMessage: Message = await (await announcementChannel.fetch()).send(options) From 9da8f47784645b093718c3aec9176ffacd5e45fe Mon Sep 17 00:00:00 2001 From: Sammy Date: Thu, 22 Jun 2023 19:38:59 +0200 Subject: [PATCH 2/2] add event box to vote closed message --- server/commands/closepoll.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/commands/closepoll.ts b/server/commands/closepoll.ts index 78a2a0b..ff3dfd8 100644 --- a/server/commands/closepoll.ts +++ b/server/commands/closepoll.ts @@ -75,7 +75,7 @@ export async function closePoll(guild: Guild, requestId: string) { async function sendVoteClosedMessage(event: GuildScheduledEvent, movie: string, guildId: string, requestId: string) { const date = event.scheduledStartAt ? format(event.scheduledStartAt, "dd.MM") : "Fehler, event hatte kein Datum" const time = event.scheduledStartAt ? format(event.scheduledStartAt, "HH:mm") : "Fehler, event hatte kein Datum" - const body = `[Abstimmung beendet] <@&${config.bot.announcement_role}> Wir gucken ${movie} am ${date} um ${time}` + const body = `[Abstimmung beendet] für https://discord.com/events/${event.guildId}/${event.id}\n<@&${config.bot.announcement_role}> Wir gucken ${movie} am ${date} um ${time}` const options: MessageCreateOptions = { content: body, allowedMentions: { parse: ["roles"] }