Merge from master #5

Merged
logan merged 65 commits from master into NoiseGateV2 2022-02-27 21:47:09 -05:00
Showing only changes of commit c68cdf9d7b - Show all commits

10
main.py
View File

@@ -26,14 +26,20 @@ class BotDeviceNotFound(Exception):
#os.execv(__file__, sys.argv)
def main():
def main(**passed_config):
print('Checking config file...')
if not check_if_config_exists():
print("No config file exists, please enter this information now")
write_config_file(init=True)
write_config_file(init=True, **passed_config)
config = read_config_file()
# Overwrite config options if they were passed
for sub in config:
# checking if key present in other dictionary
if sub in passed_config:
config[sub] = passed_config[sub]
print('Starting Bot...')
discord_bot_client = bot.Bot(Token=config['Bot Token'], Device_ID=config['Device ID'], Device_Name=config['Device Name'],