#!/usr/bin/env python3
import yaml
import logging

from discord import opus

from disco import bot

if __name__ == '__main__':
    with open('config.yaml') as f:
        config = yaml.load(f)

    kwargs = config.get('log', {}).copy()
    level = getattr(logging, kwargs.pop('level', 'info').upper(), logging.INFO)
    logging.basicConfig(level=level, **kwargs)

    if not opus.is_loaded():
        opus.load_opus(config['opus_library_path'])

    bot.configure(config)
    bot.run(config['bot']['token'])

@@ -16,16 +16,85 @@
 python3%0A
+%22%22%22Disco: a fully-featured music bot for Discord%22%22%22%0A%0Aimport argparse%0A
 import y
@@ -197,67 +197,392 @@
     
-with open('config.yaml') as f:%0A        config = yaml.load(f
+parser = argparse.ArgumentParser(%0A        prog='disco', description=__doc__,%0A        formatter_class=argparse.RawDescriptionHelpFormatter)%0A    parser.add_argument(%0A        'config', nargs='?', type=argparse.FileType('r'),%0A        default='config.yaml', help='configuration file to use')%0A    args = parser.parse_args()%0A%0A    config = yaml.load(args.config.read())%0A    args.config.close(
 )%0A%0A 

Allow users to specify the path to their config file if needed