From 1235a9bed8fa1797fef57b20da1676130645c209 Mon Sep 17 00:00:00 2001 From: Mihit Date: Sun, 9 Mar 2025 05:07:06 +1100 Subject: [PATCH] shhhh --- DiscordBot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DiscordBot.py b/DiscordBot.py index edaba00..01c894f 100644 --- a/DiscordBot.py +++ b/DiscordBot.py @@ -23,6 +23,8 @@ logger.addHandler(ch) load_dotenv() TOKEN = os.getenv('DISCORD_TOKEN') +pixelget_token = os.getenv('PIXELGET_TOKEN') +copyparty_token = os.getenv('COPYPARTY_TOKEN') #Bot intents intents = discord.Intents.default() @@ -42,7 +44,7 @@ def pixelget(url: str): except AssertionError: logger.warning("Link was not a torrent") else: - response = requests.get(f'https://pixeldrain.com/api/file/{url.split("/")[-1]}?download', headers={"Authorization": (":bdf70819-9e47-4a3f-861a-41fd448939db")}) + response = requests.get(f'https://pixeldrain.com/api/file/{url.split("/")[-1]}?download', headers={"Authorization": (f":{pixelget_token}")}) with open(title, "wb") as f: f.write(response.content) @@ -63,7 +65,7 @@ def dayuploads_get(url: str): def uploadfile(file_name: str): with open(file_name, "rb") as torrent_file: response = requests.put(f"https://upload.fieryeagle.org/torfiles/{file_name}", - torrent_file, auth=("admin","TVcZRYhT5Cd#@eY8P9NxNN2mC")) + torrent_file, auth=("admin",copyparty_token)) try: assert response.status_code in range(200, 300) except AssertionError: