24 lines
383 B
Python
24 lines
383 B
Python
|
import click
|
||
|
import logging
|
||
|
from tortoise import run_async
|
||
|
|
||
|
|
||
|
log = logging.getLogger(__name__)
|
||
|
|
||
|
|
||
|
@click.group()
|
||
|
def cli():
|
||
|
logging.basicConfig(level=logging.INFO)
|
||
|
|
||
|
|
||
|
@cli.command()
|
||
|
def run():
|
||
|
"""Runs the bot"""
|
||
|
log.info("Starting bot.")
|
||
|
from .main import bot
|
||
|
run_async(bot.start(access_token=bot.cfg["bot"]["access_token"]))
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
cli()
|