From 9bf222471d34cb756a4878b103ec82c6c4bfb191 Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Sun, 20 Dec 2020 17:14:41 +0800 Subject: [Update] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建项目结构 --- main.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 main.py (limited to 'main.py') diff --git a/main.py b/main.py new file mode 100644 index 0000000..3a2b27e --- /dev/null +++ b/main.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 +# -*- encoding: utf-8 -*- +''' +@File : main.py +@Time : 2020/12/18 18:07:07 +@Author : Kyomotoi +@Contact : kyomotoiowo@gmail.com +@Github : https://github.com/Kyomotoi +@License : Copyright © 2018-2020 Kyomotoi, All Rights Reserved. +''' +__author__ = 'kyomotoi' + +import nonebot +from nonebot.adapters.cqhttp import Bot as CQHTTPBot + +from ATRI.log import logger +from ATRI.config import NONEBOT_CONFIG, CheckConfig + +copyright = (""" +====================[ATRI | アトリ]==================== +* Mirai + NoneBot2 + Python +* Copyright © 2018-2020 Kyomotoi,All Rights Reserved +* Project: https://github.com/Kyomotoi/ATRI +* Docs: https://kyomotoi.github.io/ATRI/# +* Version: YHN-00A-001 +=======================================================""") + +CheckConfig() + +nonebot.init(**NONEBOT_CONFIG) +app = nonebot.get_asgi() +driver = nonebot.get_driver() +driver.register_adapter("cqhttp", CQHTTPBot) # type: ignore +nonebot.load_plugins('ATRI/plugins') + +if __name__ == "__main__": + logger.info(copyright) + logger.info('Running ATRI...') + nonebot.run(app='main:app') \ No newline at end of file -- cgit v1.2.3