Skip to content

Commit

Permalink
Update webhook.py
Browse files Browse the repository at this point in the history
  • Loading branch information
filispeen committed Oct 12, 2023
1 parent c9ec191 commit 6bc9887
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions F_Discord_webhook/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,14 @@ def on_file_created(event):
observer.schedule(event_handler, path=directory, recursive=False)
observer.start()

def main(turl):
def main(url):
global webhook_availibility
if not webhook_availibility:
loop = asyncio.new_event_loop() # Create a new event loop
asyncio.set_event_loop(loop)
loop.run_until_complete(av_test(turl))
loop.run_until_complete(av_test(url))
loop.close()
webhook_availibility=True
try:
while True:
time.sleep(1)
Expand All @@ -112,7 +113,7 @@ def main(turl):
observer.join()

if __name__ == '__main__':
main(turl=url)
main(url)



0 comments on commit 6bc9887

Please sign in to comment.