Added invite command

This commit is contained in:
davfsa 2018-06-16 10:50:14 +02:00 committed by GitHub
parent 97524ce9bd
commit 313e103ef8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,27 @@ class BotManager:
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
async def invite(self, bot_id :discord.Member = None, prefix = None)
em = discord.Embed()
if not bot:
raise Warning('You must include the id of the bot you are trying to invite... Be exact.')
if not bot.bot:
raise Warning('You can only invite bots.')
if not prefix:
raise Warning('Please provide a prefix')
em.name("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.colour(discord.Color(0x363941))
em.set_thumbnail(url=ctx.author.avatar_url)
em.add_field(name="Bot name", value=to_invite.name)
em.add_field(name="Bot id", value="`" + str(to_invite.id) + "`")
em.add_field(name="Bot owner", value=message.author.mention)
em.add_field(name="Bot prefix", value="`" + splitted_message[1] + "`")
await message.channel.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):
@ -123,4 +144,4 @@ class BotManager:
def setup(bot): def setup(bot):
bot.add_cog(BotManager(bot)) bot.add_cog(BotManager(bot))