New silly girl installation tutorial

Posted by mosherben on Sat, 11 Dec 2021 12:27:29 +0100

QQ group: 984698352

Boarding address: www.ake01.com top

This paper consists of the following parts

  1. Introduction to basic functions of silly girl.
  2. Silly girl robot installation (only connected to QQ)
  3. Silly girl general settings
  4. Silly girl docking WeChat / official account /TG robot
  5. Silly girl restart and replace robot QQ
  6. Silly girl Qinglong extended use.
  7. other

1, Introduction to silly girl function

1. Silly girl Qinglong expansion
You can send commands to control Qinglong tasks, add Qinglong variables, view task logs, and so on! Other projects can be connected.
2. Configuration extension
In sillygirl / conf / config Yaml file configures various API s to enrich silly girl's functions. Currently, it supports returning pictures and text (including links). See the end of the text for the sample file.
3. User defined file function extension
Put js and other files in the silygirl / development / replies / folder. It can realize user-defined extension and support timed push. For example, you can put the morning post, take out rebate and push it regularly. See the end of the text for the sample file.

2, Silly girl installation

1. One click installation of silly girl (available for both new and old users)

The command is as follows:

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

2. Wait for the command to run. The first installation of Qinglong link failed. The next step should be to show that the database is loaded.

Run to a certain extent Ctrl+C # don't wait

Then run silently

cd && cd sillyGirl ./sillyGirl -d

3. Start installing node and pm2

Node needs to be installed first JS, pm2 no, then step 6 can't daemon.

Because node6 2 or above comes with npm, so you only need to install node (remember to install version 12 or above, otherwise you can't guard)

1. Download the node compressed package and install it in the usr/local directory

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

2. Unzip the node package

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

3.node.js environment configuration
(1). Enter configuration file

vi /etc/profile

(2). Press i to enter the insert edit mode, and add the following three lines of code on the last line of the file:

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

(3) After editing, press ESC on the keyboard and enter: wq save exit input

(4) Validation profile

source /etc/profile

(5) check whether the installation is successful

node -v

npm -v

View node version node -v
Query result V14 seventeen point five
View nmp version npm -v
Query results V6 14.xx

After installation, continue to install pm2 (it seems that it can also not be installed, self-test)

npm install pm2 -g

Create soft connection ---- create according to the installation directory above

ln -s /home/node/nodejs/lib/node_modules/pm2/bin/pm2 /usr/local/bin/

Check for success

pm2 list 

Because we need to access silly girl's http service, we have to turn on the http service.
Direct robot transmission with TG and other robots
set sillyGirl enable_http_server true
set sillyGirl port 8080
No other robots can open / etc / sillygirl / sets Conf file, write these two in, and then manually restart silly girl. In the fifth part of the tutorial, manually restart.
 

//Node onebot robot connected to silly girl

1. Clone warehouse
git clone https://github.com/takayama-lily/node-onebot.git

2. Enter the warehouse
cd node-onebot

3. Create a configuration file (or copy config.sample.js)

vi config.js
module.exports = {
    //General configuration
    general: {
        platform:           1,     
        log_level:          "info",  //trace,debug,info,warn,error,mark
        use_cqhttp_notice:  false,   //Use cqhttp standard notice event format

        host:               "0.0.0.0",  //Listening host name
        port:               5700,       //The port is not fixed at will
        use_http:           false,      //Enable http
        use_ws:             false,      //Enable forward ws, using the same address and port as http
        access_token:       "",         //token to access api
        secret:             "",         //sha1 signature key of reported data
        post_timeout:       30,         //post timeout (seconds)
        post_message_format:"array",    //"string" or "array"
        enable_cors:        false,      //Allow cross domain requests
        enable_heartbeat:   false,      //Enable ws heartbeat
        heartbeat_interval: 15000,      //ws heartbeat interval (MS)
        rate_limit_interval:500,        //Use_ rate_ Queued interval (MS) between calls to api with limited suffix
        event_filter:       "",         //json format event filter file path
        post_url: [ //Reporting address, multiple URLs can be added
            // "http://your.address.com:80",
        ],
        ws_reverse_url: [ //Reverse ws address, multiple URLs can be added
            "ws://127.0.0.1:8080/qq/receive",
        ],
        ws_reverse_reconnect_interval: 3000, //Reverse ws disconnection reconnection interval (MS), set to a negative number and do not reconnect directly
        ws_reverse_reconnect_on_code_1000: true, //Does the reverse ws reconnect when the shutdown status code is 1000
    },

    //Individual configuration of each account (used to override the general configuration)
    147258369: {

    },
};

5. Log in and follow the prompts
CD & & CD node onebot & & node mainrobot account
A QR code address will be given, copied to the browser, and QQ code scanning login authorization will be opened. When the command runs, Ctrl + c exits.
6. Use pm2 daemon.

pm2 start "node main robot QQ number" # this "" look for yourself. It seems that the translation of the blog has been changed into Chinese, and you can change it back.

4. The default administrator function of QQ robot is removed from silygirl. For the initial configuration, please go to / etc / silygirl / sets Conf configuration is as follows

#Set qq administrator
set qq masters manage QQ numbers
Or SSH to execute this command

s=/etc/sillyGirl;if [ ! -d $s ];then mkdir $s; fi; echo "set qq masters Your management QQ number" > /etc/sillyGirl/sets.conf

5. Disable the robot to reply to the information by itself

set qq onself true

Restart it

Now you can play with robots

be careful:
Volunteer to open cheese (JD CK function), please execute

set jd_cookie enable_jd_cookie true and restart.

If you can't, come to me and get on the bus: www.ake01.com top

This article / resource is only for learning and communication. It is strictly prohibited to use for other purposes. Please delete it within 24 hours

Topics: Linux Operation & Maintenance server