shukriadams / discord-giveawaybot

A Discord bot that gives games away. Written in NodeJS.
MIT License
30 stars 22 forks source link

queue Command-Bug #21

Open xgedev opened 5 years ago

xgedev commented 5 years ago

The Bot is sending 2 messages for one giveaway.

Example: queue -s 1m -d 1m -u http://yourwebsite.com/ -p Code -k key

After 1 minute:

http://yourwebsite.com/ :mega: Giveaway YourWebsite :mega: React with 😃 to enter, time remaining : < a minute Given away by @Xge Giveaway ends at • heute um 13:57 Uhr 😃 1

http://yourwebsite.com/ :mega: Giveaway YourWebsite :mega: React with 😃 to enter, time remaining : < a minute Given away by @Xge Giveaway ends at • heute um 13:57 Uhr 😃 1

The second message is dead. The bot isn't editing it and ignore this.

The first message work. But if i delete the second message, the giveaway ends. Please fix this!

xgedev commented 5 years ago

Or: How can I fix this?

shukriadams commented 5 years ago

I don't have a definitive answer to this, but I suspect this is caused by LokiJS not writing being able to write state to your filesystem in time. I don't have an immediate workaround for you. I'm looking into rewriting data storage, that should hopefully remove ghost messages.