Galarzaa90 / NabBot

Discord bot for Tibia servers
https://nabbot.xyz
Apache License 2.0
52 stars 25 forks source link

What would be the best way to remove someone? #66

Closed fclaussen closed 6 years ago

fclaussen commented 6 years ago

When someone decides to leave or is kicked we still get notifications about him and it shows up under the /team command.

What would be the best way of "cleaning" the db?

If it doesn't exist already, we could have a command like /update that would check if usernames on record are currently members of the discord server the command was issued. In a negative case, remove the entry.

Galarzaa90 commented 6 years ago

it is really weird that you're still getting notifications about them. As soon as someone leaves, even if his chars are still in the database, there's no announcements for them anymore cause announce_death and announce_level check in which servers the owner is.

There's this command that can be used to clean the database, called /purge, but, it hasn't been touched in a long time so I would recommend making a database backup (users.db) before running it.

fclaussen commented 6 years ago

Hmm.. so maybe this guy showed up on /team because nobody removed him after he left the guild. I'll test that out.

Thanks

Galarzaa90 commented 6 years ago

Yes, as long as the discord user that the character is registered to is still on the discord server, he will show up in commands.