SideProjectGuys / invite-manager-bot

A discord bot that tracks invites and much more
https://docs.invitemanager.co/
GNU General Public License v3.0
165 stars 135 forks source link

Commands not working if guild is not in the DB #63

Closed AndreasGassmann closed 5 years ago

AndreasGassmann commented 6 years ago

Today we had some issues because we didn't get some guildjoin events, which means the guilds were not in our DB and the foreign keys were invalid after that.

Maybe we could make that less strict in some cases (eg logs).

Valandur commented 6 years ago

I just ran into this issue aswell. The logs were trying to be inserted for a guild that wasn't present in the DB, I didn't realize it's because of the missing join events. I think asserting that the guild is created is the better approach, because this issue will not only be a problem for logs. I will add an insert for the guilds to the logs.