Initial commit with functional framework(!) and example plugin
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
24
omnibot/__main__.py
Normal file
24
omnibot/__main__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
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())
|
||||
Reference in New Issue
Block a user