explicit typing
This commit is contained in:
parent
5e58765cf4
commit
91ec2ece7e
@ -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
|
||||
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)
|
||||
|
||||
// merge
|
||||
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