feat/40-reroll-on-disinterest #54
@ -248,7 +248,7 @@ export default class VoteController {
|
||||
logger.info("Deleting vote message")
|
||||
lastMessage.unpin()
|
||||
await lastMessage.delete()
|
||||
magnetotail marked this conversation as resolved
Outdated
|
||||
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
|
||||
magnetotail marked this conversation as resolved
magnetotail
commented
"Fehler, event hatte keine Uhrzeit" pls "Fehler, event hatte keine Uhrzeit" pls
kenobi
commented
ca99987a20baeceda27cb5e206bff42a54f31b04
done
|
||||
}
|
||||
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"))
|
||||
|
Loading…
Reference in New Issue
Block a user
rename to "getOpenVoteEvent", since other events get filtered out
ca99987a20
done
renamed to getOpenPollEvent
4e9fe587b0
renamed