Androz2091 / discord-giveaways-bot

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

Reroll error #72

Closed GeistFighter closed 3 years ago

GeistFighter commented 3 years ago

Hello,

I'm using version 4.4.2, I have a problem with the reroll command.

When I reroll several times the author of the message is also put in the winners.

Big mistake, if you put several participants and only one person checks the message an error this product in the console.

(node:18) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined at Giveaway.checkWinnerEntry (/home/container/node_modules/discord-giveaways/src/Giveaway.js:302:42) at Giveaway.roll (/home/container/node_modules/discord-giveaways/src/Giveaway.js:333:45) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async /home/container/node_modules/discord-giveaways/src/Giveaway.js:442:29 (node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:18) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:18) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined at Giveaway.checkWinnerEntry (/home/container/node_modules/discord-giveaways/src/Giveaway.js:302:42) at Giveaway.roll (/home/container/node_modules/discord-giveaways/src/Giveaway.js:333:45) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async /home/container/node_modules/discord-giveaways/src/Giveaway.js:442:29 (node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4) (node:18) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined at Giveaway.checkWinnerEntry (/home/container/node_modules/discord-giveaways/src/Giveaway.js:302:42) at Giveaway.roll (/home/container/node_modules/discord-giveaways/src/Giveaway.js:333:45) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async /home/container/node_modules/discord-giveaways/src/Giveaway.js:442:29 (node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)

Androz2091 commented 3 years ago

this has been fixed