blob: 3a2b27e304814c4665152b640c339af2d73d124c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File : main.py
@Time : 2020/12/18 18:07:07
@Author : Kyomotoi
@Contact : [email protected]
@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')
|