Created
June 13, 2018 17:51
-
-
Save TAG-Epic/98e865c2256ee4925b8ce7f10f69ffc1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| from discord.ext import commands | |
| import json | |
| import discord | |
| import asyncio | |
| class random(): | |
| def __init__(self, bot): | |
| self.bot = bot | |
| self.client = bot | |
| settings = json.loads(open("settings.json").read()) | |
| @commands.command() | |
| async def partner(self,ctx, *,link=None): | |
| """ | |
| Makes us become partners! | |
| """ | |
| if link==None: | |
| return await client.say("U have to link me a server dumbass") | |
| await ctx.message.delete() | |
| await ctx.send("Adding u as a partner xD") | |
| embed=discord.Embed(title="Partner approval!", description="{} added by {} is req to become a partner. vote with :thumbsup: or :thumbsdown: ".format(link, ctx.message.author.mention)) | |
| msg = await self.client.get_channel(449590307172909066).send(embed=embed) | |
| await self.client.add_reaction(msg, "π") | |
| await self.client.add_reaction(msg, "π") | |
| await asyncio.sleep(1) | |
| res = await self.client.wait_for_reaction(['π', 'π'], message=msg) | |
| try: | |
| if res.reaction.emoji == 'π': | |
| embed = discord.Embed(title="New partner", description=link) | |
| await client.get_channel(446586271200968705).send(embed=embed) | |
| print("New partner!") | |
| embed=discord.Embed(title="Accepted!", description="The server by {} got accepted as partner!".format(ctx.message.author.mention), color=mc) | |
| await ctx.send(embed=embed) | |
| await msg.delete() | |
| else: | |
| await msg.delete() | |
| await ctx.send("U got denyed m8") | |
| embed=discord.Embed(title="Denyed", description="The server by {} got denied by our staff. :sob:".format(ctx.message.author.mention), color=0xFF0000) | |
| await ctx.send(embed=embed) | |
| except Exception as e: | |
| print("Error!!!!") | |
| print(res.reaction.emoji) | |
| print(e) | |
| def setup(bot): | |
| bot.add_cog(random(bot)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment