Androz2091 / discord-giveaways

🎉 Complete framework to facilitate the creation of giveaways using discord.js
https://discord-giveaways.js.org
MIT License
336 stars 127 forks source link

Not getting giveaway info after restarting (quickmongo tested) #473

Closed oMvhmoud closed 2 years ago

oMvhmoud commented 2 years ago

Describe the bug

After restarting your node instance if you log your giveaways list it will show prize/msg id/channel id/etc as undefined.

Error

image

To Reproduce

  1. Run a giveaway
  2. Restart your node instance
  3. Log your giveaway list
  4. You will find every giveaway value undefined and giveaways not ending

Expected behavior

image

Additional context

Steps to Fix

  1. Go to node_modules/discord-giveaways/src/Manager.js
  2. Create a new line at 679
  3. Type in that line: rawGiveaways = rawGiveaways.map((giveaway) => giveaway.data);
  4. Save the file
  5. Restart your node instance
  6. Boom you fixed the problem

Hope you publish v5.2.3 with fixing that. (idk if its out of support rn)

Nico105 commented 2 years ago

Quickmongo introduced the responsible change with its v5.0.1 Adjusted the example in v6.0.1