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

22 lines
674 B
Python
Raw Normal View History

2021-02-01 15:13:11 +00:00
import asyncio
from graia.application import GraiaMiraiApplication, Session
from graia.broadcast import Broadcast
2021-03-21 08:14:28 +00:00
from config import Config
2021-02-01 15:13:11 +00:00
loop = asyncio.get_event_loop()
2021-04-08 12:52:36 +00:00
c = Config
2021-02-01 15:13:11 +00:00
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 已经可以根据所配置的消息接收的方式来保证消息接收部分的正常运作.
)
)