Added Digital2Discord module

Updated bot to allow live reloading
Updated WillieTimer with a lock to ensure two sessions are not opened, causing an error
Added output for config keys
Updated README.md
This commit is contained in:
Logan Cusano
2021-12-11 00:54:10 -05:00
parent cb5eeba18a
commit 5fad615f39
5 changed files with 110 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ from os.path import exists
def check_if_config_exists():
if exists('./config.ini'):
config = configparser.SafeConfigParser()
config.read('./config.ini')
if config.has_section('Bot_Info') and config.has_section('Device'):
return True
else:
@@ -24,6 +25,11 @@ def read_config_file():
'Mention Group': str(config['Bot_Info']['Mention_Group']),
'Channel ID': int(config['Bot_Info']['Channel_ID'])
}
print("Found config options:")
for key in config_return.keys():
print(f"\t{key} : {config_return[key]}")
return config_return