message -> messageText
All checks were successful
Compile the repository / compile (pull_request) Successful in 16s
Run unit tests / test (pull_request) Successful in 13s

This commit is contained in:
kenobi 2023-11-18 18:15:27 +01:00
parent 119343c916
commit a455fd8ff7

View File

@ -92,7 +92,7 @@ export default class VoteController {
// create new message // create new message
logger.info(`Creating new poll message with new movies: ${movies}`, { requestId, guildId }) logger.info(`Creating new poll message with new movies: ${movies}`, { requestId, guildId })
const message = this.createVoteMessageText(voteInfo.eventId, voteInfo.eventDate, movies, guildId, requestId) const messageText = this.createVoteMessageText(voteInfo.eventId, voteInfo.eventDate, movies, guildId, requestId)
const announcementChannel = this.client.getAnnouncementChannelForGuild(guildId) const announcementChannel = this.client.getAnnouncementChannelForGuild(guildId)
if (!announcementChannel) { if (!announcementChannel) {
logger.error(`No announcementChannel found for ${guildId}, can't post poll`) logger.error(`No announcementChannel found for ${guildId}, can't post poll`)
@ -106,7 +106,7 @@ export default class VoteController {
logger.error(`Error during removeMessage: ${err}`) logger.error(`Error during removeMessage: ${err}`)
} }
const sentMessage = await this.sendVoteMessage(message, movies.length, announcementChannel) const sentMessage = await this.sendVoteMessage(messageText, movies.length, announcementChannel)
sentMessage.pin() sentMessage.pin()
logger.info(`Sent and pinned new poll message`, { requestId, guildId }) logger.info(`Sent and pinned new poll message`, { requestId, guildId })
} }