pep8
This commit is contained in:
parent
3d508968d4
commit
6c80b5832b
@ -7,7 +7,7 @@ class BotManager:
|
|||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def invite(self, ctx, bot_id :discord.Member = None, prefix = None):
|
async def invite(self, ctx, bot_id: discord.Member = None, prefix=None):
|
||||||
if not bot_id:
|
if not bot_id:
|
||||||
raise Warning('You must include the id of the bot you are trying to invite... Be exact.')
|
raise Warning('You must include the id of the bot you are trying to invite... Be exact.')
|
||||||
if not bot_id.bot:
|
if not bot_id.bot:
|
||||||
@ -15,22 +15,24 @@ class BotManager:
|
|||||||
if not prefix:
|
if not prefix:
|
||||||
raise Warning('Please provide a prefix')
|
raise Warning('Please provide a prefix')
|
||||||
|
|
||||||
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. Please open your DMs if they are not already so the bot can contact you to inform you about the progress of the bot!"
|
em.description = "Thanks for inviting your bot! It will be tested and invited shortly. " \
|
||||||
await ctx.send(embed = em)
|
"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)
|
||||||
|
|
||||||
em = discord.Embed(title = "Bot invite", colour=discord.Color(0x363941))
|
em = discord.Embed(title="Bot invite", colour=discord.Color(0x363941))
|
||||||
em.set_thumbnail(url=bot_id.avatar_url)
|
em.set_thumbnail(url=bot_id.avatar_url)
|
||||||
em.add_field(name="Bot name", value=bot_id.name)
|
em.add_field(name="Bot name", value=bot_id.name)
|
||||||
em.add_field(name="Bot id", value="`" + str(bot_id.id) + "`")
|
em.add_field(name="Bot id", value="`" + str(bot_id.id) + "`")
|
||||||
em.add_field(name="Bot owner", value=ctx.author.mention)
|
em.add_field(name="Bot owner", value=ctx.author.mention)
|
||||||
em.add_field(name="Bot prefix", value="`" + prefix + "`")
|
em.add_field(name="Bot prefix", value="`" + prefix + "`")
|
||||||
await ctx.bot.get_channel(448803675574370304).send(embed = em)
|
await ctx.bot.get_channel(448803675574370304).send(embed=em)
|
||||||
|
|
||||||
@commands.command(name='claim', aliases=['makemine', 'gimme'])
|
@commands.command(name='claim', aliases=['makemine', 'gimme'])
|
||||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||||
async def _claim_bot(self, ctx, bot: discord.Member=None, prefix: str=None, owner : discord.Member =None):
|
async def _claim_bot(self, ctx, bot: discord.Member=None, prefix: str=None, owner: discord.Member =None):
|
||||||
if not bot:
|
if not bot:
|
||||||
raise Warning('You must include the name of the bot you are trying to claim... Be exact.')
|
raise Warning('You must include the name of the bot you are trying to claim... Be exact.')
|
||||||
if not bot.bot:
|
if not bot.bot:
|
||||||
@ -41,7 +43,7 @@ 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 != None and ctx.author.guild_permissions.manage_roles:
|
if owner is not 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
|
||||||
@ -144,6 +146,5 @@ 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