Added User Module to Main
This commit is contained in:
parent
fed7d7240f
commit
08e712c085
@ -5,8 +5,8 @@ credentialsNickname = "praxis_bot"
|
||||
|
||||
twitch_module: bool = False
|
||||
discord_module: bool = False
|
||||
|
||||
test_module: bool = False
|
||||
user_module: bool = True
|
||||
|
||||
autoJoin_TwitchChannels = ["thecuriousnerd"]
|
||||
whitelisted_TwitchPowerUsers = ["thecuriousnerd"]
|
||||
@ -41,10 +41,12 @@ blockAll_TTS_URL_Discord = True
|
||||
|
||||
autoEnabled_Discord_rgbLightControl = False
|
||||
|
||||
#User Module Configs
|
||||
blockAll_TTS_URL_UserModule = True
|
||||
|
||||
#Chyron Module Configs
|
||||
chyronListSpaceCount = 25
|
||||
|
||||
|
||||
#Lights Module Configs
|
||||
colorParse_maxDigits = 4
|
||||
|
||||
|
||||
15
main.py
15
main.py
@ -6,9 +6,10 @@ import time
|
||||
|
||||
import twitch_script
|
||||
import discord_script
|
||||
|
||||
import test_module
|
||||
|
||||
import user_module
|
||||
|
||||
import utilities_script as utility
|
||||
import config as config
|
||||
|
||||
@ -19,6 +20,7 @@ import threading
|
||||
twitchModule_: twitch_script.Twitch_Module
|
||||
discordModule_: discord_script.Discord_Module
|
||||
testModule_: test_module.Test_Module
|
||||
userModule_: user_module.User_Module
|
||||
|
||||
credentials_manager: credentials.Credentials_Module
|
||||
|
||||
@ -55,6 +57,10 @@ def test_module_init(dbCert, Empty):
|
||||
#testModule_.dbCredential = dbCert
|
||||
testModule_.main()
|
||||
|
||||
def user_module_init(dbCert, Empty):
|
||||
print("-init [USER Module]")
|
||||
userModule_.dbCredential = dbCert
|
||||
userModule_.main()
|
||||
|
||||
def thread_main():
|
||||
if not config.skip_splashScreen:
|
||||
@ -63,12 +69,14 @@ def thread_main():
|
||||
global twitchModule_
|
||||
global discordModule_
|
||||
global testModule_
|
||||
global userModule_
|
||||
|
||||
credentials_manager = credentials.Credentials_Module()
|
||||
|
||||
twitchModule_ = twitch_script.Twitch_Module()
|
||||
discordModule_ = discord_script.Discord_Module()
|
||||
testModule_ = test_module.Test_Module()
|
||||
userModule_ = user_module.User_Module()
|
||||
|
||||
credentials_manager.load_credentials()
|
||||
dbCert: credentials.DB_Credential = credentials_manager.find_Credential(credentials.DB_Credential, config.credentialsNickname)
|
||||
@ -91,6 +99,11 @@ def thread_main():
|
||||
threads.append(thread_)
|
||||
thread_.start()
|
||||
|
||||
if config.user_module == True:
|
||||
thread_ = threading.Thread(target=user_module_init, args=(dbCert, None))
|
||||
threads.append(thread_)
|
||||
thread_.start()
|
||||
|
||||
print("---Post Thread Creation Test---")
|
||||
for t in threads:
|
||||
t.join()
|
||||
|
||||
@ -25,7 +25,7 @@ class User_Module():
|
||||
message.makeMessage(message=keyboardInput)
|
||||
|
||||
if "exit" in keyboardInput:
|
||||
print("Quitting User Module Interface...")
|
||||
print("Quitting [User Module] Interface...")
|
||||
inputLoop = False
|
||||
break
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user