From 313e103ef8bae9772b8dccd6f78a6256a8f931ec Mon Sep 17 00:00:00 2001 From: davfsa Date: Sat, 16 Jun 2018 10:50:14 +0200 Subject: [PATCH] Added invite command --- src/cogs/bot_management.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/cogs/bot_management.py b/src/cogs/bot_management.py index dc42174..cb51551 100644 --- a/src/cogs/bot_management.py +++ b/src/cogs/bot_management.py @@ -6,6 +6,27 @@ class BotManager: def __init__(self, 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.cooldown(1, 5, commands.BucketType.user) 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): - bot.add_cog(BotManager(bot)) + bot.add_cog(BotManager(bot)) \ No newline at end of file