Update bot_management.py

This commit is contained in:
davfsa 2018-06-21 08:40:23 +00:00 committed by GitHub
parent 788da95c11
commit 2eb5ac124c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,9 @@ class BotManager:
return
else:
# The member is a bot
bot_owner = await ctx.bot.get_user_info(await self.bot.db_con.fetchval('select owner from bots where id = $1', member.id))
await bot_owner.add_roles(discord.utils.get(member.guild.roles, name='Bot Developers'))
await member.add_roles(discord.utils.get(member.guild.roles, name='Bots'))
try:
await member.edit(nick='[' + await self.bot.db_con.fetchval('select prefix from bots where id = $1', member.id)