split vote message handling

This commit is contained in:
kenobi 2023-07-05 23:22:13 +02:00
parent 9383cee4a0
commit e61b3a7b16
1 changed files with 3 additions and 2 deletions

View File

@ -30,9 +30,10 @@ export async function execute(event: GuildScheduledEvent) {
logger.info("EVENT DOES NOT HAVE STARTDATE; CANCELLING", { guildId: event.guildId, requestId })
return
}
const sentMessage = await client.voteController.createVoteMessage(event, announcementChannel, movies, event.guild?.id ?? "", requestId)
const sentMessageText = client.voteController.createVoteMessageText(event.id, event.scheduledStartAt, movies, event.guild?.id ?? "", requestId)
const sentMessage = await client.voteController.sendVoteMessage(sentMessageText, movies.length, announcementChannel)
sentMessage.pin() //todo: uncomment when bot has permission to pin messages. Also update closepoll.ts to only fetch pinned messages
sentMessage.pin()
}
}