diff --git a/src/cogs/bot_management.py b/src/cogs/bot_management.py index 1a58161..f5782a9 100644 --- a/src/cogs/bot_management.py +++ b/src/cogs/bot_management.py @@ -18,6 +18,14 @@ class BotManager: + '] ' + member.name) except: pass + + async def on_member_remove(self, member): + # If the member is not a bot + if member.bot is False: + return + else: + # The member is a bot + await self.bot.db_con.execute('DELETE FROM bots WHERE id = $1', member.id) @commands.command() async def invite(self, ctx, bot=None, prefix=None):