Androz2091 / discord-giveaways-bot

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

error in node module #68

Closed Sanchit-codes closed 3 years ago

Sanchit-codes commented 3 years ago

UnhandledPromiseRejectionWarning: TypeError: member.hasPermission is not a function at c:\Users\jains\node_modules\discord-giveaways\src\Giveaway.js:306:82 at Array.some () at Giveaway.checkWinnerEntry (c:\Users\jains\node_modules\discord-giveaways\src\Giveaway.js:306:54) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Giveaway.roll (c:\Users\jains\node_modules\discord-giveaways\src\Giveaway.js:340:46) at async c:\Users\jains\node_modules\discord-giveaways\src\Giveaway.js:400:29

dylanjamesdev commented 3 years ago

Same thing here


    at /Users/dylan/Desktop/Projects/Tritan-Bot/node_modules/discord-giveaways/src/Giveaway.js:306:82
    at Array.some (<anonymous>)
    at Giveaway.checkWinnerEntry (/Users/dylan/Desktop/Projects/Tritan-Bot/node_modules/discord-giveaways/src/Giveaway.js:306:54)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Giveaway.roll (/Users/dylan/Desktop/Projects/Tritan-Bot/node_modules/discord-giveaways/src/Giveaway.js:340:46)
    at async /Users/dylan/Desktop/Projects/Tritan-Bot/node_modules/discord-giveaways/src/Giveaway.js:400:29```
Androz2091 commented 3 years ago

Hello, I'm not able to reproduce this bug. Have you modified the code of the bot?

Sanchit-codes commented 3 years ago

Nah, I just copied the whole code in my bot to test it

Androz2091 commented 3 years ago

And how many winners did you choose? How many people reacted? Do you have GUILD_MEMBERS intent enabled?

Sanchit-codes commented 3 years ago

Yeah, I have them enabled but if anyone doesn't participate, it goes correctly and declares no winner but if anyone participate it crashes the bot and give error.

Nico105 commented 3 years ago

npm install Androz2091/discord-giveaways#develop is the fix, with the next release it will be in the master branch

Sanchit-codes commented 3 years ago

But how to do it in hosting. I mean I need to add it in package.json file. Can you please give in this format <dependency>: '^version'

Nico105 commented 3 years ago

Nvm, Androz release a new discord-giveaways version with the fix, so just update it with npm update discord-giveaways

Sanchit-codes commented 3 years ago

Thanks for helping I will look into it in a moment