25 lines
471 B
Python
25 lines
471 B
Python
|
|
import asyncio
|
||
|
|
import logging
|
||
|
|
|
||
|
|
from .config import ServerConfig
|
||
|
|
from .bot import Bot
|
||
|
|
|
||
|
|
logging.basicConfig(
|
||
|
|
level=logging.DEBUG,
|
||
|
|
format="%(asctime)s - %(name)-12s - %(levelname)-8s - %(message)s",
|
||
|
|
)
|
||
|
|
log = logging.getLogger(__name__)
|
||
|
|
|
||
|
|
|
||
|
|
async def main():
|
||
|
|
log.debug("Loading config")
|
||
|
|
config = ServerConfig()
|
||
|
|
config.load("config.toml")
|
||
|
|
log.debug("Using configuration: %s", config)
|
||
|
|
|
||
|
|
server = Bot(config)
|
||
|
|
await server.run()
|
||
|
|
|
||
|
|
|
||
|
|
asyncio.run(main())
|