testlolololollo

ldlwsdklwerjkw

Dec 8th, 2019
140
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pyPrivnote as pn
  2. import discord
  3. import os
  4. import requests
  5. import json
  6. import subprocess
  7. import colorama
  8. from colorama import Fore,init
  9. from discord.ext import commands
  10. import ctypes
  11. init()
  12.  
  13.  
  14. bot = commands.Bot(command_prefix='>', description='''Privnote Claimer''', self_bot=True)
  15. bot.remove_command('help')
  16. config = open('config.json', 'r')
  17. data = json.load(config)
  18. ctypes.windll.kernel32.SetConsoleTitleW("Privnote Claimer - Lifty Community | Status: Starting")
  19.  
  20. ui = '''
  21. @Lifty Community
  22. ______ _ _ _
  23. | ___ \ (_) | | (_)
  24. | |_/ / __ ___ _____| | __ _ _ _ __ ___ ___ _ __
  25. | __/ '__| \ \ / / __| |/ _` | | '_ ` _ \ / _ \ '__|
  26. | | | | | |\ V / (__| | (_| | | | | | | | __/ |
  27. \_| |_| |_| \_/ \___|_|\__,_|_|_| |_| |_|\___|_|
  28.  
  29. [Auto Claiming Privnotes from Discord]
  30. '''
  31. print(Fore.MAGENTA+ui)
  32. print()
  33.  
  34. @bot.event
  35. async def on_ready():
  36. print(' Logged in as : '+str(bot.user))
  37. print()
  38. ctypes.windll.kernel32.SetConsoleTitleW("Privnote Claimer - Lifty Community | Status: Active")
  39.  
  40.  
  41.  
  42. token = data['Token']
  43.  
  44. @bot.event
  45. async def on_message(message):
  46. if "https://privnote.com/" in message.content:
  47. note_text = pn.read_note(message.content)
  48. print(Fore.GREEN+"Found note: "+Fore.YELLOW+note_text+" "+(message.author.name))
  49. f = open("claimed.txt", "a")
  50. f.write(note_text+"\n")
  51. f.close()
  52.  
  53.  
  54. @bot.command()
  55. async def ready(ctx):
  56. await ctx.send('Bot online')
  57.  
  58.  
  59.  
  60. bot.run(token,bot=False)
RAW Paste Data