Androz2091 / discord-giveaways

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

🐛 Giveaway Freeze After Restart #210

Closed MaximKing1 closed 3 years ago

MaximKing1 commented 3 years ago

After I restart the bot it will freeze the giveaway I’m using the MongoDB example not QuickMongo I tried to play around with some of the delete after finish options didn’t work either any idea...

Nico105 commented 3 years ago

After line 448...

Nico105 commented 3 years ago

I forgot you still have the console.logs thats why its not the right line 😆

In the init function after rawGiveaways.forEach((giveaway) this line i mean

Nico105 commented 3 years ago

Ahm didn't you say you use the mysql example?

Nico105 commented 3 years ago

getAllGiveaways in your extended manager class... yk class extends

Nico105 commented 3 years ago

image not that the issue because it's already json parsing and i try what u told me but no log

ok no i find it i try wait

Bro, that is if you use default giveaway.json file to save giveawaxs. You have extended the class to use your custom DB...

Nico105 commented 3 years ago

Screenshot_20210207-231906_Chrome So you edited smth here right? Everything working now?

Nico105 commented 3 years ago

Aha, so this "json parse the data" has to be done so that mariaDB works with this package? If yes, then you can, if you want, make a pr with a mariaDB example if you really had to only change that little thing so everything works. Or if you don't want to, then you can give me what you changed and I will make one, if everything else works.

Nico105 commented 3 years ago

but you need to edit the default mysql exemple because it's not correct, it's bugged

It's only bugged if you use mariaDB right? If you use normal mysql then it works fine right? It does for me.

Nico105 commented 3 years ago

Fork this repo, change to develop branch and add a mariaDB.js file to the examples folder, put the changed code into it, then make a pr.

Nico105 commented 3 years ago

but wait, wouldn't it be better to use https://www.npmjs.com/package/mariadb this npm package for the mariaDB example? So we have a clear difference to the mysql example?