Compare commits
No commits in common. "3d70b56eb78f4caf6a5f61b6d99bb543da416a12" and "3298c7a244476f52a3fc9af1e53ff286350d7572" have entirely different histories.
3d70b56eb7
...
3298c7a244
@ -75,7 +75,7 @@ export async function closePoll(guild: Guild, requestId: string) {
|
|||||||
async function sendVoteClosedMessage(event: GuildScheduledEvent, movie: string, guildId: string, 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 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 time = event.scheduledStartAt ? format(event.scheduledStartAt, "HH:mm") : "Fehler, event hatte kein Datum"
|
||||||
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 body = `[Abstimmung beendet] <@&${config.bot.announcement_role}> Wir gucken ${movie} am ${date} um ${time}`
|
||||||
const options: MessageCreateOptions = {
|
const options: MessageCreateOptions = {
|
||||||
content: body,
|
content: body,
|
||||||
allowedMentions: { parse: ["roles"] }
|
allowedMentions: { parse: ["roles"] }
|
||||||
|
@ -6,6 +6,7 @@ import { client, yavinJellyfinHandler } from "../..";
|
|||||||
import { config } from "../configuration";
|
import { config } from "../configuration";
|
||||||
import { Maybe } from "../interfaces";
|
import { Maybe } from "../interfaces";
|
||||||
import { logger } from "../logger";
|
import { logger } from "../logger";
|
||||||
|
import { SemanticClassificationFormat } from "typescript";
|
||||||
|
|
||||||
|
|
||||||
export const name = 'guildScheduledEventCreate'
|
export const name = 'guildScheduledEventCreate'
|
||||||
@ -41,7 +42,7 @@ export async function execute(event: GuildScheduledEvent) {
|
|||||||
}
|
}
|
||||||
const date = format(event.scheduledStartAt, "dd.MM")
|
const date = format(event.scheduledStartAt, "dd.MM")
|
||||||
const time = format(event.scheduledStartAt, "HH:mm")
|
const time = format(event.scheduledStartAt, "HH:mm")
|
||||||
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`
|
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`
|
||||||
|
|
||||||
for (let i = 0; i < movies.length; i++) {
|
for (let i = 0; i < movies.length; i++) {
|
||||||
message = message.concat(Emotes[i]).concat(": ").concat(movies[i]).concat("\n")
|
message = message.concat(Emotes[i]).concat(": ").concat(movies[i]).concat("\n")
|
||||||
@ -50,7 +51,7 @@ export async function execute(event: GuildScheduledEvent) {
|
|||||||
|
|
||||||
const options: MessageCreateOptions = {
|
const options: MessageCreateOptions = {
|
||||||
allowedMentions: { parse: ["roles"]},
|
allowedMentions: { parse: ["roles"]},
|
||||||
content: message,
|
content: message
|
||||||
}
|
}
|
||||||
|
|
||||||
const sentMessage: Message<true> = await (await announcementChannel.fetch()).send(options)
|
const sentMessage: Message<true> = await (await announcementChannel.fetch()).send(options)
|
||||||
|
Loading…
Reference in New Issue
Block a user