feat/40-reroll-on-disinterest #54
@ -58,14 +58,14 @@ export default class VoteController {
|
||||
public async handleReroll(voteMessage: VoteMessage, guild: Guild, guildId: string, requestId: string) {
|
||||
|
||||
//get movies that already had votes to give them a second chance
|
||||
magnetotail marked this conversation as resolved
Outdated
|
||||
const voteInfo = await this.parseVoteInfoFromVoteMessage(voteMessage, requestId)
|
||||
const voteInfo: VoteMessageInfo = await this.parseVoteInfoFromVoteMessage(voteMessage, requestId)
|
||||
|
||||
// get movies from jellyfin to fill the remaining slots
|
||||
const newMovieCount = config.bot.random_movie_count - voteInfo.votes.filter(x => x.count > 2).length
|
||||
const newMovies = await this.yavinJellyfinHandler.getRandomMovieNames(newMovieCount, guildId, requestId)
|
||||
const newMovieCount: number = config.bot.random_movie_count - voteInfo.votes.filter(x => x.count > 2).length
|
||||
const newMovies: string[] = await this.yavinJellyfinHandler.getRandomMovieNames(newMovieCount, guildId, requestId)
|
||||
|
||||
magnetotail marked this conversation as resolved
Outdated
magnetotail
commented
above WHAT threshold? What does it do?? above WHAT threshold? What does it do??
kenobi
commented
20da25f2bf9a473704f8b4660e5f05183679ba39
kenobi
commented
Mit einem Kommentar versehen und entsprechend deines vorschlags umbenannt Mit einem Kommentar versehen und entsprechend deines vorschlags umbenannt
|
||||
// merge
|
||||
magnetotail marked this conversation as resolved
Outdated
magnetotail
commented
threshold seems to be a magic number threshold seems to be a magic number
magnetotail
commented
Or rename method to "hasAtLeastOneVote" Or rename method to "hasAtLeastOneVote"
kenobi
commented
296a490e935cbdb79b70d73d2df9bc12a5774c53
kenobi
commented
done done
|
||||
const movies = newMovies.concat(voteInfo.votes.map(x => x.movie))
|
||||
const movies: string[] = newMovies.concat(voteInfo.votes.map(x => x.movie))
|
||||
|
||||
// create new message
|
||||
await this.closePoll(guild, requestId)
|
||||
|
Loading…
Reference in New Issue
Block a user
Parameter die eine Message sind heißen oft "message", manchmal aber auch "msg". sollte vereinheitlicht sein
66507cb08f
fc64728a78
Jetzt sollten alle Occurences beseitigt sein.