Bunch more big changes here too

This commit is contained in:
Joe S
2020-06-08 21:57:59 -04:00
parent 2bd54e59db
commit bcc8d29ebf
12 changed files with 183 additions and 35 deletions

View File

@@ -0,0 +1,20 @@
from discord_webhook import DiscordWebhook
import subprocess
webhookURL = "https://discordapp.com/api/webhooks/719690867811811348/8LExCQbqOPP0XAdNcbV8JHrVYupOSYmeLwkBJWCDCe72JoPyc4Yy_R2wzbkKSN33MPAn"
out = subprocess.Popen(['echo messages | bconsole'],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
shell=True)
stdout,stderr = out.communicate()
print(stdout)
print(stderr)
cleaned_stdout = b"```" + stdout.partition(b"\nmessages\n")[2] + b"```"
if (cleaned_stdout != b'```You have no messages.\n```'):
webhook = DiscordWebhook(url=webhookURL, content=cleaned_stdout)
response = webhook.execute()
else:
print("Done.")