ping watch role when voting starts and closes
This commit is contained in:
@ -61,15 +61,16 @@ export async function closePoll(guild: Guild, requestId: string) {
|
||||
}
|
||||
|
||||
async function updateMessage(movie: string, message: Message, guildId: string, requestId: string) {
|
||||
const role = (await message.guild!.roles.fetch()).find(role => role.id === config.bot.announcement_role)
|
||||
const body = `[Abstimmung beendet] Gewonnen hat: ${movie}`
|
||||
.concat(message.cleanContent.substring("[Abstimmung]".length))
|
||||
.concat(message.content.substring("[Abstimmung]".length))
|
||||
|
||||
const options: MessageEditOptions = {
|
||||
content: body,
|
||||
allowedMentions: { parse: ["roles"] }
|
||||
}
|
||||
logger.info("Updating message.", { guildId, requestId })
|
||||
message.edit(options)
|
||||
|
||||
}
|
||||
|
||||
async function updateEvent(votes: Vote[], guild: Guild, guildId: string, requestId: string) {
|
||||
|
Reference in New Issue
Block a user