check if config file exists
This commit is contained in:
parent
e391b138e5
commit
ef24e2a2bf
1 changed files with 3 additions and 0 deletions
|
@ -550,6 +550,9 @@ def main():
|
|||
)
|
||||
args = parser.parse_args()
|
||||
config = configparser.ConfigParser()
|
||||
if not os.path.exists(args.config):
|
||||
logger.critical('config file not found')
|
||||
exit(1)
|
||||
config.read(args.config)
|
||||
audio_path = config['DEFAULT']['audio_path']
|
||||
token = config['discord']['token']
|
||||
|
|
Loading…
Reference in a new issue