A Mirai Bot based on Miraicle, born for OI.
基于 Miraicle 的 Mirai QQ 机器人,为 OI 而生。
- /duel bind <洛谷UID>:绑定洛谷账号
- /duel list:查看当前正在进行的对战
- /duel rank:查看 Duel Rating 排行榜
- /duel problem :随机跳题
- /duel begin @user :发起 Duel
- /duel accpet:接受 Duel
- /duel reject:拒绝 Duel
- /duel judge:完成 Duel 并结算
- /duel change:发起换题请求
- /duel giveup:投降
- /duel cancel:主动取消
- /today @user:今日做题情况
- /today report:所有人今日做题排行
- /hello:检查 Bot 存活性
- /admin list:查看管理员列表
- /admin add @user:添加管理员
- /admin del @user:移除管理员
- /test:检查网络连接,防止洛谷日爆
- /about:版本信息
输入 “> ” + 问题(尖括号右侧有一个空格)向 ChatGPT 提问
API 服务由 Gestar Cloud 提供
pip install -r requirements.txt
打开 bot.py
,修改以下内容:
qq = 2752038425 # 机器人 QQ 号
verify_key = 'd92n3duch23h' # mirai-api-http 密钥
port = 8081 # # mirai-api-http 的 HTTP 服务端口
打开 config/luogu.json
,修改以下内容
{
"account": {
"_uid": "洛谷登录 Cookie 中的 _uid",
"__client_id": "洛谷登录 Cookie 中的 __client_id"
}
}
python bot.py
在群众发送 /switcher enable all
启用全部模块,或使用 /switcher enable <Module>
启用特定模块。