feat/40-reroll-on-disinterest #54
@ -273,15 +273,15 @@ export default class VoteController {
|
||||
}
|
||||
return votes
|
||||
magnetotail marked this conversation as resolved
|
||||
}
|
||||
public async getOpenPollEvent(guild: Guild, guildId: string, requestId: string): Promise<GuildScheduledEvent | null> {
|
||||
public async getOpenPollEvent(guild: Guild, guildId: string, requestId: string): Promise<Maybe<GuildScheduledEvent>> {
|
||||
const voteEvents = (await guild.scheduledEvents.fetch())
|
||||
.map((value) => value)
|
||||
.filter(event => event.name.toLowerCase().includes("voting offen"))
|
||||
logger.debug(`Found events: ${JSON.stringify(voteEvents, null, 2)}`, { guildId, requestId })
|
||||
|
||||
if (!voteEvents || voteEvents.length <= 0) {
|
||||
logger.error("Could not find vote event. Cancelling update!", { guildId, requestId })
|
||||
return null
|
||||
logger.error("Could not find an open vote event.", { guildId, requestId })
|
||||
magnetotail marked this conversation as resolved
Outdated
magnetotail
commented
why plural? why plural?
kenobi
commented
Because this was unintentional :)
Because this was unintentional :)
ca99987a20baeceda27cb5e206bff42a54f31b04
fixed
|
||||
return
|
||||
}
|
||||
return voteEvents[0]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user
"Fehler, event hatte keine Uhrzeit" pls
ca99987a20
done