Merge remote-tracking branch 'origin/development' into development
# Conflicts: # src/cogs/bot_management.py
This commit is contained in:
commit
3d508968d4
@ -17,9 +17,7 @@ class BotManager:
|
|||||||
|
|
||||||
em = discord.Embed(colour = self.bot.embed_color)
|
em = discord.Embed(colour = self.bot.embed_color)
|
||||||
em.title = "Hello {},".format(ctx.author.name)
|
em.title = "Hello {},".format(ctx.author.name)
|
||||||
em.description = "Thanks for inviting your bot! It will be tested and invited shortly. " \
|
em.description = "Thanks for inviting your bot! It will be tested and invited shortly. Please open your DMs if they are not already so the bot can contact you to inform you about the progress of the bot!"
|
||||||
"Please open your DMs if they are not already so the bot can contact " \
|
|
||||||
"you to inform you about the progress of the bot!"
|
|
||||||
await ctx.send(embed = em)
|
await ctx.send(embed = em)
|
||||||
|
|
||||||
em = discord.Embed(title = "Bot invite", colour=discord.Color(0x363941))
|
em = discord.Embed(title = "Bot invite", colour=discord.Color(0x363941))
|
||||||
@ -43,10 +41,11 @@ class BotManager:
|
|||||||
else:
|
else:
|
||||||
raise Warning('Prefix not provided and can\'t be found in bot name.')
|
raise Warning('Prefix not provided and can\'t be found in bot name.')
|
||||||
|
|
||||||
if owner is not None and ctx.author.guild_permissions.manage_guild:
|
if owner != None and ctx.author.guild_permissions.manage_roles:
|
||||||
author_id = owner.id
|
author_id = owner.id
|
||||||
else:
|
else:
|
||||||
author_id = ctx.author.id
|
author_id = ctx.author.id
|
||||||
|
|
||||||
em = discord.Embed()
|
em = discord.Embed()
|
||||||
|
|
||||||
if await self.bot.db_con.fetchval('select count(*) from bots where owner = $1', author_id) >= 10:
|
if await self.bot.db_con.fetchval('select count(*) from bots where owner = $1', author_id) >= 10:
|
||||||
@ -105,7 +104,7 @@ class BotManager:
|
|||||||
em.colour = self.bot.error_color
|
em.colour = self.bot.error_color
|
||||||
em.title = 'Bot Not Found'
|
em.title = 'Bot Not Found'
|
||||||
em.description = 'That bot is not claimed'
|
em.description = 'That bot is not claimed'
|
||||||
elif existing['owner'] != ctx.author.id and ctx.author.guild_permissions.manage_guild:
|
elif existing['owner'] != ctx.author.id and not ctx.author.guild_permissions.manage_roles:
|
||||||
em.colour = self.bot.error_color
|
em.colour = self.bot.error_color
|
||||||
em.title = 'Not Claimed By You'
|
em.title = 'Not Claimed By You'
|
||||||
em.description = 'That bot is claimed by someone else.\n' \
|
em.description = 'That bot is claimed by someone else.\n' \
|
||||||
@ -145,5 +144,6 @@ class BotManager:
|
|||||||
await ctx.send(ctx.guild.get_member(owner['owner']).display_name)
|
await ctx.send(ctx.guild.get_member(owner['owner']).display_name)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot.add_cog(BotManager(bot))
|
bot.add_cog(BotManager(bot))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user