Esempio n. 1
0
def generate_qr(config_file, qr_file):
    with open(config_file, 'rt', encoding='utf-8') as f:
        config = yaml.safe_load(f)
    cuabot = CUABot(config)
    bot_url = cuabot.generate_qr(qr_file)
    click.echo('QR generated on file: {0} - Bot url: {1}'.format(
        qr_file, bot_url))
Esempio n. 2
0
def show_schedule(config_file):
    with open(config_file, 'rt', encoding='utf-8') as f:
        config = yaml.safe_load(f)
    cuabot = CUABot(config)
    click.echo(cuabot.show_schedule())
Esempio n. 3
0
def list_commands(config_file):
    with open(config_file, 'rt', encoding='utf-8') as f:
        config = yaml.safe_load(f)
    cuabot = CUABot(config)
    click.echo('Enter these commands in BotFather:')
    click.echo(cuabot.get_commands())
Esempio n. 4
0
def run(config_file):
    with open(config_file, 'rt', encoding='utf-8') as f:
        config = yaml.safe_load(f)
    cuabot = CUABot(config)
    cuabot.run()