diff --git a/guild2.py b/guild2.py index a686574..5c677d5 100644 --- a/guild2.py +++ b/guild2.py @@ -139,26 +139,26 @@ async def on_message(message): else: mess = await message.reply(embed=guilded.Embed(title=":sweebot-fail: Permission denied.")) print("[" + RED + "FAIL" + RESET + "] Not restarting script, Permission Denied for " + message.author.name) - elif command[0] == "spammy-shell": - if "full" in getperms(message.author.id): - mess = await message.reply("```No output (yet)```") - print("[" + BLUE + "..." + RESET + "] Running shell... (initiated by " + message.author.name + ")") - sleep(1) - p = subprocess.Popen(command[1:], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - output = "" - first = True - for line in iter(p.stdout.readline, b''): - if first: - await mess.edit("```" + line.decode().rstrip() +"```") - first = False - else: - await message.channel.send("```" + line.decode().rstrip() +"```") - p.stdout.close() - p.wait() - await message.channel.send("**Finished.**") - else: - mess = await message.reply(embed=guilded.Embed(title=":sweebot-fail: Permission denied.")) - print("[" + RED + "FAIL" + RESET + "] Not restarting script, Permission Denied for " + message.author.name) + #elif command[0] == "spammy-shell": + # if "full" in getperms(message.author.id): + # mess = await message.reply("```No output (yet)```") + # print("[" + BLUE + "..." + RESET + "] Running shell... (initiated by " + message.author.name + ")") + # sleep(1) + # p = subprocess.Popen(command[1:], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + # output = "" + # first = True + # for line in iter(p.stdout.readline, b''): + # if first: + # await mess.edit("```" + line.decode().rstrip() +"```") + # first = False + # else: + # await message.channel.send("```" + line.decode().rstrip() +"```") + # p.stdout.close() + # p.wait() + # await message.channel.send("**Finished.**") + # else: + # mess = await message.reply(embed=guilded.Embed(title=":sweebot-fail: Permission denied.")) + # print("[" + RED + "FAIL" + RESET + "] Not restarting script, Permission Denied for " + message.author.name) elif command[0] == "whoami": if getperms(message.author.id) != []: