Closed DomeQdev closed 3 years ago
Okay, I fixed it, but add it in next update src/Manager.ejs:398
:
giveaway.message.edit(giveaway.messages.giveaway, { embed }).catch(() => {})
Make that bot will delete the giveaway from database when message was deleted
Make that bot will delete the giveaway from database when message was deleted
This is a little risky because the error can also be caused when the Discord API bugs around or sometimes it is not able do fetch all giveaways at the first attempt, especially when the bot has a lot of giveaways active and has a lot of servers. I experienced the later case and had to restart my bot until it was able to fetch all giveaways. My opinion would be that this should be added through extending the manager on own risk.
I agree with @Nico105, and I would like to add that personally I like that my bot can resume a giveaway even if for a few minutes it was removed from the giveaway channel for example. But indeed, it's very painful to receive error messages in the terminal so I added .catch and it no longer logs them.
(will be available in the next release)