add arguments

pull/74/head
Mallory Hancock 2019-08-28 12:22:56 -07:00
parent abfc6189d3
commit 93cb2784ee
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ class Config(Schema):
class Meta:
unknown = INCLUDE
def read_conf(config):
def read_conf(config, conf_format):
schema = Config()
if not conf_format:
if config.name.endswith('.json'):
@ -53,7 +53,7 @@ def read_conf(config):
@click.command()
@click.argument('config', type=click.File('rb'))
@click.option('--format', '-f', 'conf_format', type=click.Choice(['json', 'yaml', 'toml']))
def cli(config):
def cli(config, conf_format):
config = read_conf(config, conf_format)
bot = Bot(**config)
bot.start()