Androz2091 / discord-giveaways-bot

🎁Giveways Bot using the discord-giveaways package
ISC License
202 stars 167 forks source link

TypeError when there isn't enough participants in giveaway #76

Closed Hakunek closed 3 years ago

Hakunek commented 3 years ago

when there is set more winners than there are participants it returns this error: UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined

Location of errors: at Giveaway.checkWinnerEntry (D:------\node_modules\discord-giveaways\src\Giveaway.js:302:42) at Giveaway.roll (D:------\node_modules\discord-giveaways\src\Giveaway.js:333:45) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async D:------\node_modules\discord-giveaways\src\Giveaway.js:400:29

example: like giveaway is set for 2 or more winners but there is one participant

ss with proof: image image

Androz2091 commented 3 years ago

this has been fixed