Update bot_management.py

This commit is contained in:
davfsa 2018-06-20 20:20:06 +02:00 committed by GitHub
parent 327a5e74d2
commit 871a5f73be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,14 @@ class BotManager:
except: except:
pass 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() @commands.command()
async def invite(self, ctx, bot=None, prefix=None): async def invite(self, ctx, bot=None, prefix=None):
bot = await ctx.bot.get_user_info(bot) bot = await ctx.bot.get_user_info(bot)