Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import json
- import datetime
- import os
- import random
- import requests
- from random import choice
- from discord.ext import commands
- from discord.ext.commands import Bot
- from discord.voice_client import VoiceClient
- import asyncio
- import safygiphy
- import aiohttp
- from io import BytesIO
- from bs4 import BeautifulSoup
- from googleapiclient.discovery import build
- import xml.etree.ElementTree as ET
- import config
- import shlex
- from PIL import Image
- description = 'Your eyelids feel heavy..'
- bot = commands.Bot(command_prefix="x", description=description)
- client = discord.Client()
- os.chdir(r'C:\Users\Kabdel\AppData\Local\Programs\Python\Python36-32')
- eightBall = ['It is certain', 'It is decidedly so', 'Without a doubt',
- 'Yes, definitely', 'You may rely on it', 'As I see it, yes',
- 'Most likely', 'Outlook good', 'Yes', 'Signs point to yes',
- 'Reply hazy, try again', 'Ask again later', 'Better not tell you now',
- 'Cannot predict now', 'Concentrate and ask again',
- 'Don\'t count on it', 'My reply is no', 'My sources say no',
- 'Outlook not so good', 'Very doubtful']
- pname = ['Orpheus', 'Io', 'Hermes', 'Polydeuces', 'Penthesilea', 'Palladion', 'Cerberus', 'Nemesis', 'Castor', 'Psyche']
- rfooters = ["owo", "uwu", "uguu", "owaa"]
- CHAT = ["REMAKE"]
- #pimage = ['https://vignette.wikia.nocookie.net/megamitensei/images/d/d7/Orpheus_fullsize.jpg/revision/latest/scale-to-width-down/1000?cb=20141128234733',
- #'https://vignette.wikia.nocookie.net/megamitensei/images/9/94/Io.png/revision/latest/scale-to-width-down/1000?cb=20141209084442',
- # 'https://vignette.wikia.nocookie.net/megamitensei/images/a/aa/P3M_Hermes.jpg/revision/latest?cb=20131216161221',
- #'https://vignette.wikia.nocookie.net/megamitensei/images/0/04/Polydeuces.jpg/revision/latest?cb=20080728201121',
- #'https://vignette.wikia.nocookie.net/megamitensei/images/7/78/Penthesilea.jpg/revision/latest?cb=20080723014235',
- #'https://vignette.wikia.nocookie.net/megamitensei/images/7/7f/P3M_pallaion.jpg/revision/latest?cb=20140410151442',
- #'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',
- #'https://vignette.wikia.nocookie.net/megamitensei/images/e/e3/Nemesis.png/revision/latest?cb=20161019072510',
- #'https://vignette.wikia.nocookie.net/megamitensei/images/0/09/P3-Castor.png/revision/latest?cb=20161019072208',
- #'https://vignette.wikia.nocookie.net/megamitensei/images/1/1b/P3-Psyche.jpg/revision/latest?cb=20080723091734']
- class remake(commands.Cog):
- def __init__(self, bot):
- self.bot = bot
- @commands.command(pass_context=True)
- @commands.cooldown(3, 10, commands.BucketType.user)
- async def start(self, ctx):
- """Start your Persona profile (Required to do any other persona commands, DO NOT USE AGAIN UNLESS YOU WISH TO RESTART)"""
- fileopen = ctx.message.author.id + ".json"
- file = open(fileopen, "w", encoding="utf-8")
- data = {}
- data["Name"] = "{}".format(ctx.message.author)
- data["Persona"] = None
- json.dump(data, file, ensure_ascii=False)
- await ctx.send('Normally all other commands would work now but im a whore so yeah nah :joy:')
- @commands.command(pass_context=True)
- @commands.cooldown(3, 10, commands.BucketType.user)
- async def profile(self, ctx, user: discord.Member):
- fileopen = user.id + ".json"
- file = open(fileopen, "r", encoding="utf-8")
- data = json.load(file)
- name = data["Name"]
- gift = data["Persona"]
- print(name)
- print(gift)
- pembed = discord.Embed(title="", description="{}'s profile".format(name), color=0x00ff00)
- pembed.add_field(name="Persona", value=gift)
- pembed.set_image(url="http://bit.ly/{}aris".format(gift))
- await ctx.send(embed=pembed)
- @commands.command(pass_context=True)
- @commands.cooldown(3, 10, commands.BucketType.user)
- async def persona(self, ctx):
- """Get your own persona."""
- random_name = choice(pname)
- author = ctx.message.author
- authorid = ctx.message.author.id
- fileopen = "{}".format(authorid) + ".json"
- file1 = open(fileopen, "r", encoding="utf-8")
- #data = json.load(file1)
- #prename = data["Name"]
- #gift = data["Persona"]
- #fileopen2 = "{}".format(authorid) + ".json"
- #file2 = open(fileopen2, "w", encoding="utf-8")
- #data = {}
- #data["Name"] = prename
- #data["Persona"] = " ".replace(" ", "{}".format(random_name))
- #json.dump(data, file2, ensure_ascii=False)
- epersona = discord.Embed(title="", description="**You've got: {}!**".format(random_name), color=0x00ff00)
- epersona.set_footer(text=random.choice(rfooters))
- epersona.set_image(url="http://bit.ly/{}aris".format(random_name))
- epersona.set_author(name="Congratulations {}!".format(author.name))
- await ctx.send(embed=epersona)
- def setup(bot):
- bot.add_cog(remake(bot))
- print('Persona commands loaded')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement