Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/core/broadcast.py
2021-03-21 16:14:28 +08:00

25 lines
796 B
Python

import asyncio
from os.path import abspath
from graia.application import GraiaMiraiApplication, Session
from graia.broadcast import Broadcast
from config import Config
loop = asyncio.get_event_loop()
config_filename = 'config.cfg'
config_path = abspath('./config/' + config_filename)
c = Config().config
bcc = Broadcast(loop=loop, debug_flag=c('debug_flag'))
app = GraiaMiraiApplication(
broadcast=bcc,
enable_chat_log=c('enable_chat_log'),
connect_info=Session(
host=c('host'), # 填入 httpapi 服务运行的地址
authKey=c('authkey'), # 填入 authKey
account=c('account'), # 你的机器人的 qq 号
websocket=c('websocket') # Graia 已经可以根据所配置的消息接收的方式来保证消息接收部分的正常运作.
)
)