Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 28th, 2020 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import discord, string, random
  2. from discord.ext import commands
  3. from PIL import Image, ImageDraw, ImageFont
  4.  
  5. bot = commands.Bot(command_prefix="..")
  6.  
  7.  
  8. @bot.event
  9. async def on_ready():
  10.     print('Logged on as {0}!'.format(bot.user))
  11.  
  12.  
  13. @bot.command()
  14. async def verify(ctx):
  15.     messages = []
  16.     messages.append(ctx.message)
  17.     await ctx.message.channel.delete_messages(messages)
  18.     msg = await ctx.send(f"Hey {ctx.message.author.mention}, Remember to check your DM's!")
  19.     messages.append(msg)
  20.     member = ctx.message.author
  21.     dm = bot.get_user(int(ctx.message.author.id))
  22.     all_verification = discord.Embed(title="All verification types:", description="1.) Captcha\n2.) React\n3.) Math\n4.) Question\n5.) Verify Link")
  23.     all_verification.set_footer(text="Supporter link: https://discord.gg/es8ctcA")
  24.     await dm.send(embed=all_verification)
  25.     msg = await bot.wait_for('message', check=lambda message: message.author == ctx.author, timeout=30)
  26.     if msg.content == "1":
  27.         text = []
  28.         for i in range(15):
  29.             num = random.randint(0, len(string.ascii_letters))
  30.             text.append(string.ascii_letters[num-1])
  31.         img = Image.new('RGB', (150, 35), color=(0, 0, 0))
  32.         d = ImageDraw.Draw(img)
  33.         fnt = ImageFont.truetype('Roboto-Regular.ttf', 15)
  34.         d = ImageDraw.Draw(img)
  35.         d.text((10, 10), "".join(text), font=fnt, fill=(255, 255, 255))
  36.         img.save('captcha.png')
  37.         embed = discord.Embed(title="CAPTCHA! YOU HAVE 30 SECONDS", description="HERE IS THE CODE:", color=discord.colour.Color.gold())
  38.         await dm.send(embed=embed)
  39.         await dm.send(file=discord.File('captcha.png'))
  40.         msg = await bot.wait_for('message', check=lambda message: message.author == ctx.author, timeout=30)
  41.         if str(msg.content) == str("".join(text)):
  42.             channel = bot.get_channel(686472295471906816)
  43.             role = discord.utils.get(ctx.channel.guild.roles, name="Verified")
  44.             await member.add_roles(role)
  45.             await dm.send(f"{ctx.message.author.mention}, You have been verified!")
  46.         else:
  47.             await dm.send("Please try again")
  48.     if msg.content == "2":
  49.         all_reactions = ["😀", "😁", "😂", "😃", "😄", "😅", "😆", "😉", "😊", "😋", "😎", "😍", "😘", "🥰"]
  50.         num = random.randint(0, len(all_reactions)-1)
  51.         random_reaction = all_reactions[num]
  52.         insert = random.randint(1, 5)
  53.         reaction_captcha = discord.Embed(title="React with the correct emoji", description=f"Your emoji is {random_reaction}")
  54.         msg = await dm.send(embed=reaction_captcha)
  55.         all_reactions.pop(num)
  56.         for i in range(5):
  57.             if insert == i:
  58.                 await msg.add_reaction(random_reaction)
  59.             else:
  60.                 await msg.add_reaction(all_reactions[random.randint(0, len(all_reactions))-1])
  61.         def check(reaction, user):
  62.             return user == ctx.message.author and str(reaction.emoji) == str(random_reaction)
  63.         emj, user = await bot.wait_for('reaction_add', timeout=30, check=check)
  64.         if emj.emoji == str(random_reaction):
  65.             channel = bot.get_channel(686472295471906816)
  66.             role = discord.utils.get(ctx.channel.guild.roles, name="Verified")
  67.             await member.add_roles(role)
  68.             await dm.send(f"{ctx.message.author.mention}, You have been verified!")
  69.         else:
  70.             await dm.send("Please try again")
  71.     elif msg.content == "3":
  72.         first = random.randint(1, 10)
  73.         second = random.randint(1, 10)
  74.         math_embed = discord.Embed(title="This is your math question:", description=f"What is {first}*{second}?")
  75.         math_embed.set_footer(text="Please answer below")
  76.         await dm.send(embed=math_embed)
  77.         msg = await bot.wait_for('message', check=lambda message: message.author == ctx.author, timeout=30)
  78.         if msg.content == str(first*second):
  79.             channel = bot.get_channel(686472295471906816)
  80.             role = discord.utils.get(ctx.channel.guild.roles, name="Verified")
  81.             await member.add_roles(role)
  82.             await dm.send(f"{ctx.message.author.mention}, You have been verified!")
  83.         else:
  84.             await dm.send("Please try again")
  85.     elif msg.content == "4":
  86.         questions = ["What is the last name of the president of ameirca?", "How many cms are in 1m?",
  87.                      "What company makes Iphones?", "How many moons does the earth have?",
  88.                      "Which country is shaped like a boot?", "How many suns does our solar system have?"]
  89.         answers = ["Trump", "100", "Apple", "1", "Italy", "1"]
  90.         num = random.randint(0, 5)
  91.         question_embed = discord.Embed(title="Answer this question:", description=f"{questions[num]}")
  92.         await dm.send(embed=question_embed)
  93.         msg = await bot.wait_for('message', check=lambda message: message.author == ctx.author, timeout=30)
  94.         if msg.content.lower() == str(answers[num]).lower():
  95.             channel = bot.get_channel(686472295471906816)
  96.             role = discord.utils.get(ctx.channel.guild.roles, name="Verified")
  97.             await member.add_roles(role)
  98.             await dm.send(f"{ctx.message.author.mention}, You have been verified!")
  99.         else:
  100.             await dm.send("Please try again")
  101.     elif msg.content == "5":
  102.         embed = discord.Embed(title="Please verify by pressing", description="[here!](https://strikebot.co.uk/verify)",
  103.                               color=discord.colour.Color.green())
  104.         await dm.send(embed=embed)
  105.     await ctx.channel.delete_messages(messages)
  106.  
  107.  
  108. bot.run("NjkzNDIwNzEyMzkxNzM3Mzg1.Xn80cw.SfrOPL7z47qDPNQng2duf36Mmjg")
  109. #bot.run("NjkyMTM5MDc5MTQzNTIyMzY4.XnqKyA.0ejmwMCYA3lrU3OfcKCTMphqrxk")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top