猫猫ちゃん二代目源代码。初代目
python -m venv Nekochan
cd Nekochan
source bin/activate
pip install nb-cli
nb driver install nonebot2[fastapi]
nb driver install nonebot2[websockets]
nb adapter install nonebot_adapter_mirai2
nb plugin install nonebot-plugin-apscheduler
下载安装包iTXTech/mcl-installer并运行
./mcl --update-package net.mamoe:mirai-api-http --type plugin --channel stable-v2
运行一次,配置QQ号,退出
./mcl -u
编辑产生的配置文件
cat << EOF > ${MIRAI2_ROOT}/config/net.mamoe.mirai-api-http/setting.yml
adapters:
- ws
debug: false
enableVerify: true
verifyKey: WRITE_YOUR_KEY_HERE
singleMode: false
cacheSize: 2048
adapterSettings:
ws:
host: 127.0.0.1
port: 5700
EOF
cat << EOF > .env
ENVIRONMENT=prod
VERIFY_KEY=WRITE_YOUR_KEY_HERE
driver=~fastapi+~websockets
MIRAI_HOST=127.0.0.1
MIRAI_PORT=5700
MIRAI_QQ=["123456789"]
SUPERUSERS=[]
EOF
./mcl -u # Start Mirai2 first
nb run # Start Nonebot2