Update bot_management.py

This commit is contained in:
davfsa 2018-06-20 19:55:50 +02:00 committed by GitHub
parent 423edf1a3a
commit 239261eeaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,8 +13,11 @@ class BotManager:
else: else:
# The member is a bot # The member is a bot
await member.add_roles(discord.utils.get(member.guild.roles, name='Bot')) await member.add_roles(discord.utils.get(member.guild.roles, name='Bot'))
try:
await member.edit(nick='[' + await self.bot.db_con.fetch('select prefix from bots where id = $1', member.id) await member.edit(nick='[' + await self.bot.db_con.fetch('select prefix from bots where id = $1', member.id)
+ '] ' + member.name) + '] ' + member.name)
except:
pass
@commands.command() @commands.command()
async def invite(self, ctx, bot: discord.User=None, prefix=None): async def invite(self, ctx, bot: discord.User=None, prefix=None):