Merge pull request 'feat/#43_append_event_invite' (#49) from feat/#43_append_event_invite into master

Reviewed-on: #49
This commit is contained in:
Sammy 2023-06-23 15:49:59 +02:00
commit 3d70b56eb7
2 changed files with 3 additions and 4 deletions

View File

@ -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"] }

View File

@ -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<true> = await (await announcementChannel.fetch()).send(options)