TRSS Yunzai 云崽配合NTQQ搭建QQ机器人使用指南
TRSS Yunzai 云崽配合NTQQ搭建QQ机器人使用指南

TRSS Yunzai 云崽配合NTQQ搭建QQ机器人使用指南

TRSS-Yunzai项目:https://github.com/TimeRainStarSky/Yunzai

NTQQ项目:https://github.com/LagrangeDev/Lagrange.Core

必要的环境准备,以Ubuntu系统为例

nodejs环境:要求>=21版本

apt update

apt install npm

npm install n -g

n stable或n 21

node -v

安装Redis
apt install redis-server

安装chromium浏览器

apt update

apt install chromium-browser

国外

git clone --depth 1 https://github.com/TimeRainStarSky/Yunzai

国内

git clone --depth 1 https://gitee.com/TimeRainStarSky/Yunzai

cd Yunzai

安装 pnpm 和依赖

npm i -g pnpm

pnpm i

从NTQQ项目地址 Releases里面下载对应系统版本QQ

如果是手机端:

wget https://github.com/LagrangeDev/Lagrange.Core/releases/download/nightly/Lagrange.OneBot_linux-arm64_8.0.zip

解压

unzip Lagrange.OneBot_linux-arm64_8.0.zip

运行

  • cd 到解压目录publish,chmod +x ./Lagrange.OneBot #可执行权限(可选)
  • 推荐创建一个screen会话用来保持应用进行后台运行:screen -S bot,登录完毕后可以切换到前台使用Ctrl + a,然后按 d,重新连接screen -r bot
  • 输入 ./Lagrange.OneBotEnter运行。
  • 第一次运行时, 会在同级目录下自动生成默认的 appsettings.json 配置文件,修改成如下,该项目已经自带签名,所以签名处不用修改。
{
    "Logging": {
        "LogLevel": {
            "Default": "Information",
            "Microsoft": "Warning",
            "Microsoft.Hosting.Lifetime": "Information"
        }
    },
    "SignServerUrl": "https://sign.lagrangecore.org/api/sign",
    "MusicSignServerUrl": "",
    "Account": {
        "Uin": 0,
        "Password": "",
        "Protocol": "Linux",
        "AutoReconnect": true,
        "GetOptimumServer": true
    },
    "Message": {
        "IgnoreSelf": true,
        "StringPost": false
    },
    "QrCode": {
        "ConsoleCompatibilityMode": false
    },
    "Implementations": [
        {
            "Type": "ReverseWebSocket",
            "Host": "127.0.0.1",
            "Port": 2536,
            "Suffix": "/OneBotv11",
            "ReconnectInterval": 5000,
            "HeartBeatInterval": 5000,
            "AccessToken": ""
        }
    ]
}

最新的签名地址是 https://sign.lagrangecore.org/api/sign/25765

 Lagrange 正式运行后会在同一文件夹下会出现一张登录二维码图片 qr-0.png, 在二维码过期前(120秒)尽快使用手机 QQ 扫码登录。

cp qr-0.png /sdcard/Pictures

安装插件

推荐安装插件(可选)
#安装genshin
#安装miao-plugin
#安装TRSS-Plugin

#安装Guoba-Plugin

#安装chatgpt-plugin

#安装ap-plugin

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

Title - Artist
0:00