nextcloud token hidden
This commit is contained in:
@@ -25,6 +25,7 @@ load_dotenv()
|
|||||||
TOKEN = os.getenv('DISCORD_TOKEN')
|
TOKEN = os.getenv('DISCORD_TOKEN')
|
||||||
pixelget_token = os.getenv('PIXELGET_TOKEN')
|
pixelget_token = os.getenv('PIXELGET_TOKEN')
|
||||||
copyparty_token = os.getenv('COPYPARTY_TOKEN')
|
copyparty_token = os.getenv('COPYPARTY_TOKEN')
|
||||||
|
nextcloud_token = os.getenv('NEXTCLOUD_TOKEN')
|
||||||
|
|
||||||
#Bot intents
|
#Bot intents
|
||||||
intents = discord.Intents.default()
|
intents = discord.Intents.default()
|
||||||
@@ -73,7 +74,7 @@ def uploadfile(file_name: str):
|
|||||||
|
|
||||||
# with open(file_name, "rb") as file:
|
# with open(file_name, "rb") as file:
|
||||||
# response = requests.put(f"https://cloud.woelkli.com/remote.php/dav/files/ddseed%40tutanota.com/torfiles/{file_name}",
|
# response = requests.put(f"https://cloud.woelkli.com/remote.php/dav/files/ddseed%40tutanota.com/torfiles/{file_name}",
|
||||||
# file, auth=("ddseed@tutanota.com", "hsPBH0S60&DQB6dD.2"))
|
# file, auth=("ddseed@tutanota.com", nextcloud_token))
|
||||||
# try:
|
# try:
|
||||||
# assert response.status_code in range(200, 300)
|
# assert response.status_code in range(200, 300)
|
||||||
# except AssertionError:
|
# except AssertionError:
|
||||||
@@ -137,7 +138,7 @@ async def on_message(message):
|
|||||||
for i in files:
|
for i in files:
|
||||||
try:
|
try:
|
||||||
uploadfile(i)
|
uploadfile(i)
|
||||||
except AssertationError:
|
except AssertionError:
|
||||||
logger.error("Upload failed, quitting...")
|
logger.error("Upload failed, quitting...")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user