├── README.md ├── config.json └── psu.py /README.md: -------------------------------------------------------------------------------- 1 | # PSU-Obfuscator-api 2 | Prefix is `?`
3 | All what you need is to change discord token in `config.json` to your discord token.
4 | Install requirements if python asking for it.
5 | Join to their server, because its dming to bot.
6 | 7 | Example usage:
8 | ![Image of Yaktocat](https://i.imgur.com/1srMM3L.png) 9 | 10 | 11 | ### You're not allowed to sell it. 12 | Message from Perth:
13 | ![Image of Yaktocat](https://i.imgur.com/00APt8I.png) 14 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your discord token goes here", 3 | "prefix": "?", 4 | "psu-bot-id": 720075043886858320, 5 | "psu-bot-server": 720077159984529539 6 | } -------------------------------------------------------------------------------- /psu.py: -------------------------------------------------------------------------------- 1 | #<--------------Imports Start--------------> 2 | import requests 3 | import discord 4 | from discord.ext import commands 5 | from discord.utils import get 6 | import json 7 | from datetime import date 8 | import io 9 | import asyncio 10 | import threading 11 | import os 12 | #<--------------Imports End--------------> 13 | bot_config = json.loads(open("config.json", "r").read()) 14 | psubotid = bot_config["psu-bot-id"] 15 | psubotserver = bot_config["psu-bot-server"] 16 | prefix = bot_config["prefix"] 17 | 18 | bot = commands.Bot(command_prefix=prefix, self_bot=True) 19 | bot.remove_command('help') 20 | 21 | 22 | @bot.event 23 | async def on_ready(): 24 | print("Bot is ready!") 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | @bot.command() 33 | async def ob(ctx,*args): 34 | try: 35 | attachment_url = ctx.message.attachments[0].url 36 | script_to_obfuscate = str(requests.get(attachment_url).text) 37 | except: 38 | script_to_obfuscate = "none" 39 | 40 | if script_to_obfuscate == "none": 41 | embed = discord.Embed(title="Hey bitches its made by GameOverAgain#1875", description="", color=0xFF0000) 42 | embed.add_field(name="Error", value="`Error occured! {Please upload the .txt/.lua file.}`", inline=False) 43 | await ctx.send(embed=embed) 44 | else: 45 | server = bot.get_guild(psubotserver) 46 | member = server.get_member(psubotid) 47 | await member.send("!obfuscate") 48 | try: 49 | await bot.wait_for("message",timeout=60.0) 50 | except asyncio.TimeoutError: 51 | await ctx.send("Failed to obfuscate") 52 | else: 53 | f = io.StringIO(script_to_obfuscate) 54 | await member.send(file=discord.File(f, "script" + ".lua")) 55 | def check(file): 56 | return file.attachments != [] and file.author.id == psubotid 57 | try: 58 | fileforthing = await bot.wait_for("message",timeout=60.0,check=check) 59 | except asyncio.TimeoutError: 60 | await ctx.send("Failed to obfuscate") 61 | else: 62 | thingtoget = fileforthing.attachments[0].url 63 | readyfile = str(requests.get(thingtoget).text) 64 | f = io.StringIO(readyfile) 65 | await ctx.send(content="> `Obfuscation Completed`",file=discord.File(f, "script" + ".lua")) 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | bot.run(bot_config["token"], bot=False) --------------------------------------------------------------------------------