rename to getOpenPollEvent
All checks were successful
Compile the repository / compile (pull_request) Successful in 17s
Run unit tests / test (pull_request) Successful in 13s

This commit is contained in:
kenobi 2023-11-19 20:13:49 +01:00
parent 03b6a30ffa
commit 4e9fe587b0

View File

@ -248,7 +248,7 @@ export default class VoteController {
logger.info("Deleting vote message")
lastMessage.unpin()
await lastMessage.delete()
const event = await this.getOpenEvent(guild, guild.id, requestId)
const event = await this.getOpenPollEvent(guild, guild.id, requestId)
if (event && votes?.length > 0) {
this.updateOpenPollEventWithVoteResults(event, votes, guild, guildId, requestId)
this.sendVoteClosedMessage(event, votes[0].movie, guildId, requestId)
@ -273,7 +273,7 @@ export default class VoteController {
}
return votes
}
public async getOpenEvent(guild: Guild, guildId: string, requestId: string): Promise<GuildScheduledEvent | null> {
public async getOpenPollEvent(guild: Guild, guildId: string, requestId: string): Promise<GuildScheduledEvent | null> {
const voteEvents = (await guild.scheduledEvents.fetch())
.map((value) => value)
.filter(event => event.name.toLowerCase().includes("voting offen"))