mirror of
https://github.com/majmongoose/PageBot.git
synced 2024-09-19 12:06:35 -04: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 subprocess
|
||||||
import time
|
import time
|
||||||
import secrets_file
|
import secrets_file
|
||||||
|
import threading
|
||||||
from watchdog.observers import Observer
|
from watchdog.observers import Observer
|
||||||
from watchdog.events import FileSystemEventHandler
|
from watchdog.events import FileSystemEventHandler
|
||||||
import speech_recognition as sr
|
import speech_recognition as sr
|
||||||
@ -116,7 +117,8 @@ if __name__ == "__main__":
|
|||||||
observer.start()
|
observer.start()
|
||||||
|
|
||||||
## Launch TTD
|
## 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
|
## initialize discord
|
||||||
intents = discord.Intents.default()
|
intents = discord.Intents.default()
|
||||||
|
Loading…
Reference in New Issue
Block a user