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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user