File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 4
4
composer.lock
5
5
example
6
6
/tmp
7
-
7
+ src / config.php
8
8
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public function send()
29
29
switch ($ type ) {
30
30
case 'text ' :
31
31
//@我或者好友发消息都自动回复
32
- if (true == $ this ->message ['isAt ' ] || $ this ->message ['fromType ' ]== 'Friend ' ) {
32
+ if (true == $ this ->message ['isAt ' ] || $ this ->message ['fromType ' ] == 'Friend ' ) {
33
33
$ return =$ this ->getTulingBot ();
34
34
Text::send ($ this ->message ['from ' ]['UserName ' ], $ return );
35
35
}
@@ -47,16 +47,20 @@ public function send()
47
47
case 'red_packet ' :
48
48
// code...
49
49
break ;
50
+ case 'new_friend ' :
51
+ Text::send ($ this ->message ['from ' ]['UserName ' ], '客官,等你很久了!感谢跟 oop 交朋友,我是 kcloze 的贴身秘书,当你累了困惑了,可以随时呼叫我! ' . PHP_EOL . '高山流水遇知音,知音不在谁堪听?焦尾声断斜阳里,寻遍人间已无 ' );
52
+ break ;
50
53
case 'request_friend ' :
51
- // code...
54
+ $ friends = vbot ('friends ' );
55
+ $ friends ->approve ($ message );
52
56
break ;
53
57
case 'group_change ' :
54
- // code...
58
+ Text:: send ( $ this -> message [ ' from ' ][ ' UserName ' ], ' 欢迎新人 ' . $ this -> message [ ' invited ' ] . PHP_EOL . ' 邀请人: ' . $ this -> message [ ' inviter ' ]);
55
59
break ;
56
-
57
60
default :
58
61
// code...
59
62
break ;
63
+
60
64
}
61
65
}
62
66
You can’t perform that action at this time.
0 commit comments