SHARE
TWEET

Untitled

a guest Apr 22nd, 2019 132 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import discord
  2. import json
  3. import datetime
  4. import os
  5. import random
  6. import requests
  7. from random import choice
  8. from discord.ext import commands
  9. from discord.ext.commands import Bot
  10. from discord.voice_client import VoiceClient
  11. import asyncio
  12. import safygiphy
  13. import aiohttp
  14. from io import BytesIO
  15. from bs4 import BeautifulSoup
  16. from googleapiclient.discovery import build
  17. import xml.etree.ElementTree as ET
  18. import config
  19. import shlex
  20. from PIL import Image
  21.  
  22. description = 'Your eyelids feel heavy..'
  23. bot = commands.Bot(command_prefix="x", description=description)
  24. client = discord.Client()
  25.  
  26.  
  27. os.chdir(r'C:\Users\Kabdel\AppData\Local\Programs\Python\Python36-32')
  28.  
  29. eightBall = ['It is certain', 'It is decidedly so', 'Without a doubt',
  30.                         'Yes, definitely', 'You may rely on it', 'As I see it, yes',
  31.                         'Most likely', 'Outlook good', 'Yes', 'Signs point to yes',
  32.                         'Reply hazy, try again', 'Ask again later', 'Better not tell you now',
  33.                         'Cannot predict now', 'Concentrate and ask again',
  34.                         'Don\'t count on it', 'My reply is no', 'My sources say no',
  35.                         'Outlook not so good', 'Very doubtful']
  36.  
  37.  
  38. pname = ['Orpheus', 'Io', 'Hermes', 'Polydeuces', 'Penthesilea', 'Palladion', 'Cerberus', 'Nemesis', 'Castor', 'Psyche']
  39.  
  40. rfooters = ["owo", "uwu", "uguu", "owaa"]
  41.  
  42. CHAT = ["REMAKE"]
  43.  
  44.  
  45. #pimage = ['https://vignette.wikia.nocookie.net/megamitensei/images/d/d7/Orpheus_fullsize.jpg/revision/latest/scale-to-width-down/1000?cb=20141128234733',
  46.  #'https://vignette.wikia.nocookie.net/megamitensei/images/9/94/Io.png/revision/latest/scale-to-width-down/1000?cb=20141209084442',
  47. # 'https://vignette.wikia.nocookie.net/megamitensei/images/a/aa/P3M_Hermes.jpg/revision/latest?cb=20131216161221',
  48.  #'https://vignette.wikia.nocookie.net/megamitensei/images/0/04/Polydeuces.jpg/revision/latest?cb=20080728201121',
  49.  #'https://vignette.wikia.nocookie.net/megamitensei/images/7/78/Penthesilea.jpg/revision/latest?cb=20080723014235',
  50.  #'https://vignette.wikia.nocookie.net/megamitensei/images/7/7f/P3M_pallaion.jpg/revision/latest?cb=20140410151442',
  51.  #'https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/intermediary/f/62b8c318-bc06-4bc8-ba51-793279432484/d6wsgia-79d0ee54-49de-406d-a4eb-65da52202ba0.jpg/v1/fill/w_350,h_250,q_70,strp/koromaru_and_cerberus_p3_by_azurealnare_d6wsgia-250t.jpg',
  52.  #'https://vignette.wikia.nocookie.net/megamitensei/images/e/e3/Nemesis.png/revision/latest?cb=20161019072510',
  53.  #'https://vignette.wikia.nocookie.net/megamitensei/images/0/09/P3-Castor.png/revision/latest?cb=20161019072208',
  54.  #'https://vignette.wikia.nocookie.net/megamitensei/images/1/1b/P3-Psyche.jpg/revision/latest?cb=20080723091734']
  55.  
  56.  
  57. class remake(commands.Cog):
  58.     def __init__(self, bot):
  59.         self.bot = bot
  60.  
  61.     @commands.command(pass_context=True)
  62.     @commands.cooldown(3, 10, commands.BucketType.user)
  63.     async def start(self, ctx):
  64.         """Start your Persona profile (Required to do any other persona commands, DO NOT USE AGAIN UNLESS YOU WISH TO RESTART)"""
  65.         fileopen = ctx.message.author.id + ".json"
  66.         file = open(fileopen, "w", encoding="utf-8")
  67.         data = {}
  68.         data["Name"] = "{}".format(ctx.message.author)
  69.         data["Persona"] = None
  70.         json.dump(data, file, ensure_ascii=False)
  71.         await ctx.send('Normally all other commands would work now but im a whore so yeah nah :joy:')
  72.  
  73.  
  74.     @commands.command(pass_context=True)
  75.     @commands.cooldown(3, 10, commands.BucketType.user)
  76.     async def profile(self, ctx, user: discord.Member):
  77.        
  78.         fileopen = user.id + ".json"
  79.         file = open(fileopen, "r", encoding="utf-8")
  80.         data = json.load(file)
  81.         name = data["Name"]
  82.         gift = data["Persona"]
  83.         print(name)
  84.         print(gift)
  85.         pembed = discord.Embed(title="", description="{}'s profile".format(name), color=0x00ff00)
  86.         pembed.add_field(name="Persona", value=gift)
  87.         pembed.set_image(url="http://bit.ly/{}aris".format(gift))
  88.         await ctx.send(embed=pembed)
  89.  
  90.  
  91.     @commands.command(pass_context=True)
  92.     @commands.cooldown(3, 10, commands.BucketType.user)
  93.     async def persona(self, ctx):
  94.         """Get your own persona."""
  95.                
  96.         random_name = choice(pname)
  97.         author = ctx.message.author
  98.         authorid = ctx.message.author.id
  99.  
  100.         fileopen = "{}".format(authorid) + ".json"
  101.         file1 = open(fileopen, "r", encoding="utf-8")
  102.         #data = json.load(file1)
  103.         #prename = data["Name"]
  104.         #gift = data["Persona"]
  105.         #fileopen2 = "{}".format(authorid) + ".json"
  106.         #file2 = open(fileopen2, "w", encoding="utf-8")
  107.         #data = {}
  108.         #data["Name"] = prename
  109.         #data["Persona"] = " ".replace(" ", "{}".format(random_name))
  110.         #json.dump(data, file2, ensure_ascii=False)
  111.         epersona = discord.Embed(title="", description="**You've got: {}!**".format(random_name), color=0x00ff00)
  112.         epersona.set_footer(text=random.choice(rfooters))
  113.         epersona.set_image(url="http://bit.ly/{}aris".format(random_name))
  114.         epersona.set_author(name="Congratulations {}!".format(author.name))
  115.         await ctx.send(embed=epersona)
  116.  
  117.    
  118.  
  119. def setup(bot):
  120.     bot.add_cog(remake(bot))
  121.     print('Persona commands loaded')
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