Advertisement
Guest User

Nitro Sniper By YZ

a guest
Dec 22nd, 2019
4,511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. from discord.ext import commands
  2. import discord
  3. import re, requests
  4. from colorama import Fore, init
  5. init()
  6.  
  7. token = input("Enter your token:") # just replace it here with your token if you don't want to enter it each time
  8. while 1:
  9. try:
  10. bot = commands.Bot(command_prefix=".", self_bot=True)
  11.  
  12. @bot.event
  13. async def on_ready():
  14. print("[+] Bot is ready")
  15.  
  16. @bot.event
  17. async def on_message(ctx):
  18. if 'discord.gift' in ctx.content:
  19. code = re.search("discord.gift/(.*)", ctx.content).group(1)
  20. if len(code) != 16:
  21. print("[=] Auto-detected a fake code : "+code)
  22. else:
  23. print(Fore.LIGHTGREEN_EX+"[-] Snipped code : "+code+" From "+ctx.author.name+"#"+ctx.author.discriminator)
  24. r = requests
  25. result = r.post('https://discordapp.com/api/v6/entitlements/gift-codes/'+code+'/redeem', json={"channel_id":str(ctx.channel.id)}, headers={'authorization':token}).text
  26. if 'This gift has been redeemed already.' in result:
  27. print(Fore.YELLOW+"[-] Code has been already redeemd : "+code+Fore.RESET)
  28. elif 'nitro' in result:
  29. print(Fore.GREEN+"[+] Code applied : "+code+Fore.RESET)
  30. elif 'Unknown Gift Code' in result:
  31. print(Fore.RED+"[-] Invalid Code : "+code+Fore.RESET)
  32. # made by yz cuwl dude :sunglasses:
  33.  
  34. bot.run(token, bot=False)
  35. except KeyError:
  36. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement