irpas技术客

傻妞机器人安装完整教程【最新版】- 6月14日更新_MIKE笔记

网络 4307

文章目录 前言一、sillyGirl机器人简介一、搭建步骤1??安装wget unzip gcc gcc-c++ git?2??傻妞一键安装命令🌼3??安装node.js🌺4??设置管理员🍬5??node-noebot接入傻妞🍹6??安装screen🥤7??开启芝士🍇 三、自定义中添加API配置🤳四、实现自定义扩展——插件👀总结???


前言

🥇个人主页:@MIKE笔记 🥈文章专栏:技术教程 📣TG交流群:https://t.me/mike_note

微信公众号:MIKE小助手——可直接上车 需要安装另外一个机器人点击👉XDD机器人 傻妞命令大全点击👉sillyGirl傻妞命令大全 👉傻妞对接微信公众号教程

一、sillyGirl机器人简介

1.傻妞青龙扩展 可以发送命令控制青龙任务,添加青龙变量,查看任务日志等等!可对接其他项目。 2.配置扩展 在sillyGirl/conf/config.yaml文件配置各种API,让傻妞功能丰富多彩。目前支持返回图片和文本(包括链接)。样例文件见文末。 3.自定义文件功能扩展 在sillyGirl/develop/replies/文件夹内放入js等文件。可实现自定义扩展,支持定时推送。比如你可以放早报、外卖返利定时推送等。样例文件见文末。

一、搭建步骤 1??安装wget unzip gcc gcc-c++ git?

代码如下(示例):

yum install wget unzip gcc gcc-c++ git screen -y 2??傻妞一键安装命令🌼

代码如下(示例): 注意?:以前安装过傻妞的,先删除文件,进入root目录下,找到文件夹sillygirl,删除即可,然后在终端执行下面命令

s=sillyGirl;a=arm64;if [[ $(uname -a | grep "x86_64") != "" ]];then a=amd64;fi ;if [ ! -d $s ];then mkdir $s;fi ;cd $s;wget http://github.yanyuge.workers.dev/https://github.com/cdle/${s}/releases/download/main/${s}_linux_$a -O $s && chmod 777 $s;pkill -9 $s;$(pwd)/$s

如果上面命令提示404,那就是代理失效了,更换代理即可,目前可用代理👇

https://github.zhlh6.cn/ http://toolwa.com/github/ https://ghproxy.com/ https://gh.api.99988866.xyz/ https://git.metauniverse-cn.com/ https://xbkj.298998518.workers.dev/

更换方法:

s=sillyGirl;a=arm64;if [[ $(uname -a | grep "x86_64") != "" ]];then a=amd64;fi ;if [ ! -d $s ];then mkdir $s;fi ;cd $s;wget 将这几个加粗的文字用代理地址替代https://github.com/cdle/${s}/releases/download/main/${s}_linux_$a -O $s && chmod 777 $s;pkill -9 $s;$(pwd)/$s

例如:

s=sillyGirl;a=arm64;if [[ $(uname -a | grep "x86_64") != "" ]];then a=amd64;fi ;if [ ! -d $s ];then mkdir $s;fi ;cd $s;wget https://xbkj.298998518.workers.dev/https://github.com/cdle/${s}/releases/download/main/${s}_linux_$a -O $s && chmod 777 $s;pkill -9 $s;$(pwd)/$s

等命令运行完毕。 Ctrl + c 退出


3??安装node.js🌺

代码如下(下载):

cd /usr/local && wget https://nodejs.org/dist/v14.17.5/node-v14.17.5-linux-x64.tar.xz

代码如下(解压):

xz -dk node-v14.17.5-linux-x64.tar.xz && tar -xvf node-v14.17.5-linux-x64.tar

代码如下(修改/etc/profile,添加到文件最后一行):

export NODE_HOME=/usr/local/node-v14.17.5-linux-x64 export PATH=$PATH:$NODE_HOME/bin export NODE_PATH=$NODE_HOME/lib/node_modules

代码如下(生效配置文件):

source /etc/profile

代码如下(检查是否安装成功):

node -v npm -v
4??设置管理员🍬

代码如下(示例):

s=/etc/sillyGirl;if [ ! -d $s ];then mkdir $s; fi; echo "set qq masters 你的管理QQ号" > /etc/sillyGirl/sets.conf
5??node-noebot接入傻妞🍹

代码如下(拉取node-noebot):

cd ~ && git clone https://ghproxy.com/https://github.com/takayama-lily/node-onebot.git

修改文件 手动去文件夹/root/node-onebot 到config.sample.js 先把config.sample.js改成config.js

代码如下(config.js修改):

ws_reverse_url: [ //反向ws地址,可以添加多个url "ws://127.0.0.1:8080/qq/receive",

代码如下(启动sillyGirl):

cd && cd sillyGirl && ./sillyGirl -t

按键盘Ctrl + c

代码如下(静默sillyGirl):

./sillyGirl -d cd && cd node-onebot && node main 机器人QQ

第一次登录,一定使用👺密码登陆,稳定性高点

如果选择扫码,有可能需要用到《滑块验证获取ticket教程》 扫码后可能如果出现登录环境异常,请看《解决扫码登录异常问题》 遇到反向链接失败请看解决《傻妞反向ws连接(ws://127.0.0.1:8080/qq/receive)被关闭,关闭码1006 ,将在3000毫秒后尝试连接》

按键盘 Ctrl + c 保存退出


6??安装screen🥤

代码如下(示例):

yum -y install screen

等命令运行完毕。 Ctrl + c 退出

代码如下(创建scree会话):

screen -S node-onebot

运行出现空白

代码如下(再运行noebot):

cd && cd node-onebot && node main 机器人QQ

然后直接用按键的Ctrl + a + d 退出会话就行! 注意?:请务必按照以上步骤来


7??开启芝士🍇

注?:聊天页面直接发送

代码如下(用管理员QQ给你的机器人QQ发送命令):

set jd_cookie enable_jd_cookie true

用管理员QQ给你的机器人QQ发送命令:

重启

?后面扩展自行选择安装,不安装不影响基本使用?

三、自定义中添加API配置🤳

在/root/sillyGirl/conf/config.yaml添加下面代码

replies: #文本类型的回复 - type: text rules: - 在吗 content: 我是微信公众号:MIKE小助手,欢迎来撩! #链接类型回复 - type: url rules: - 壁纸 - 二次元 request: #图片 response_type: image url: https://acg.toubiec.cn/random.php - type: url rules: - 姐姐 - 妹妹 - 小姐姐 request: #图片 response_type: image url: http://api.btstu.cn/sjbz/zsy.php - type: url rules: - 舔狗日记 - 舔狗 request: #纯文本 response_type: text url: https://api.oick.cn/dog/api.php - type: url - 股票 (.*) request: #纯文本 response_type: text url: https://zyzcfa.com:444/api/stocks?keyword={{1}} - type: url rules: - 蓝奏云 (.*) (.*) - 蓝奏云 (.*) - 蓝奏云 (.*)密码:(.*) request: #纯文本 response_type: json url: http://yingy.20wl.co/Api/php/LanZous.php?url={{1}}&pwd={{2}} get: data.url - type: url rules: - 游戏 - 开始游戏 request: #纯文本 response_type: text url: http://hm.suol.cc/API/game_gs.php?msg=开始游戏 - type: url rules: - 答 (.*) - 答(.*) request: #纯文本 response_type: text url: http://hm.suol.cc/API/game_gs.php?msg=答{{1}} - type: url rules: - 提示 request: #纯文本 response_type: text url: http://hm.suol.cc/API/game_gs.php?msg=提示 - type: url rules: - ^查字\s*(\S*)$ replace: - - <br> - "\n" request: response_type: template url: https://api.tianapi.com/txapi/xhzd/index?key=19eea766886493ecd04e770d0c2b56f9&word={{1}} template: "汉字:gjson(newslist.[0].hanzi)\n读音:gjson(newslist.[0].pyyb)\n解释:gjson(newslist.[0].content)\n拓展:gjson(newslist.[0].explain)" # - type: url # rules: # - .* # request: # #纯文本 # response_type: json # url: https://api.ixiaowai.cn/tgrj/index.php # get: data.msg

效果图

四、实现自定义扩展——插件👀

放在目录sillyGirl/develop/replies/ 傻妞插件合集下载,密码:MIKE

效果 效果样例——视频

总结???

教程到此结束,教程本人实践不少于30次总结而来,如果操作失败,一定不是教程的问题! 🚦文章内代码仅用作个人学习备忘录,


更多相关教程👇👇👇技术教程👈专栏


1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,会注明原创字样,如未注明都非原创,如有侵权请联系删除!;3.作者投稿可能会经我们编辑修改或补充;4.本站不提供任何储存功能只提供收集或者投稿人的网盘链接。

标签: #傻妞机器人安装完整教程最新版 #6月14日更新 #unzip #gcc #gccc