removed discord requirement

This commit is contained in:
piair 2022-09-30 14:26:34 +02:00
parent da33edb381
commit a1969a3e2e
1 changed files with 2 additions and 2 deletions

4
V4.py
View File

@ -89,8 +89,8 @@ SuccessLink = config["DISCORD"]["successlink"]
ErrorLink = config["DISCORD"]["errorlink"]
discord_enabled = config["DISCORD"]["enabled"]
webhookFailure = Webhook.from_url(ErrorLink, adapter=RequestsWebhookAdapter())
if discord_enabled:
webhookFailure = Webhook.from_url(ErrorLink, adapter=RequestsWebhookAdapter())
webhookSuccess = Webhook.from_url(SuccessLink, adapter=RequestsWebhookAdapter())
#base settings
@ -278,7 +278,7 @@ def LogError(message, log=FULL_LOG, Mobdriver=None):
else:
gdriver = driver
if LINUX_HOST:
if LINUX_HOST and discord_enabled:
with open("page.html", "w") as f:
f.write(gdriver.page_source)