mirror of
https://github.com/majmongoose/PageBot.git
synced 2024-11-04 16:51:17 -05:00
Add threading to allow the watchdog to run in the background
This commit is contained in:
parent
1b3ffe497a
commit
479d6a7145
@ -4,6 +4,7 @@ import os
|
||||
import subprocess
|
||||
import time
|
||||
import secrets_file
|
||||
import threading
|
||||
from watchdog.observers import Observer
|
||||
from watchdog.events import FileSystemEventHandler
|
||||
import speech_recognition as sr
|
||||
@ -116,7 +117,8 @@ if __name__ == "__main__":
|
||||
observer.start()
|
||||
|
||||
## Launch TTD
|
||||
launch_and_watch(secrets_file.ttd_path)
|
||||
watchdog_thread = threading.Thread(target=launch_and_watch, args=(secrets_file.ttd_path,))
|
||||
watchdog_thread.start()
|
||||
|
||||
## initialize discord
|
||||
intents = discord.Intents.default()
|
||||
|
Loading…
Reference in New Issue
Block a user