3
3
include 'LineCross.php ' ;
4
4
use x9119x \LineCross ;
5
5
6
- const AUTH_TOKEN = "" ;
6
+ const AUTH_TOKEN = "" ; //PUT YOUR AuthToken HERE
7
+ const ADMIN_MID = "" ; //YOUR LINE UNIQUE ID FROM LINE DATABASE
7
8
8
- $ AuthInfo = new \x9119x \AuthInfo (AUTH_TOKEN );
9
+
10
+ $ AuthInfo = new \x9119x \AuthInfo (AUTH_TOKEN ); //Put AUTH_TOKEN HERE
9
11
10
12
try {
11
- $ Line = new LineCross ();
13
+ $ Line = new LineCross ($ AuthInfo ); //Put $AuthInfo HERE
12
14
}catch (x9119x \TalkException $ e ) {
13
15
echo "\033[0;31m[ERROR] \033[0m " .$ e ->reason . PHP_EOL ;
14
16
exit ;
@@ -69,10 +71,12 @@ public function Alloc($Ops){
69
71
70
72
$ args = explode (" " , $ text );
71
73
if ($ args [0 ] == "members " ){
72
- if ($ this ->_from != " u5e7641aec03eaaf4513227c7aeef5c97 " ){
73
- $ this ->Line ->LineService ->sendMessage ("who the fuck are you? you're not admin! " , $ Op ->message ->to );
74
+ if ($ this ->_from != ADMIN_MID ){
75
+ $ this ->Line ->LineService ->sendMessage ("who are you? you're not admin! " , $ Op ->message ->to );
74
76
return ;
75
77
}
78
+
79
+ //GET GROUP INFO
76
80
$ getGroupInfo = $ this ->Line ->LineService ->getGroup ($ Op ->message ->to );
77
81
78
82
$ members = "" ;
@@ -82,29 +86,15 @@ public function Alloc($Ops){
82
86
}
83
87
$ this ->Line ->LineService ->sendMessage ($ members , $ Op ->message ->to );
84
88
}else if ($ args [0 ] == strtolower ("kick " )){
85
- //GET ACCEPTED ACCOUNT
86
- $ getIDs = json_decode (file_get_contents ("debugGroupMLHY " ), true );
87
- $ accIDs = array ();
88
-
89
- foreach ($ getIDs ["members " ] as $ key ){
90
- array_push ($ accIDs , $ key ["mid " ]);
91
- }
92
- //CHECK ACCEPTED ACCOUNT
93
- if (!in_array ($ this ->_from , $ accIDs )){
94
- $ this ->Line ->LineService ->sendMessage ("who the fuck are you? you're not admin! " , $ Op ->message ->to );
95
- return ;
96
- }
97
-
98
- //CHECK GROUP
99
- if ($ Op ->message ->to == "c8f25b930e19bd85e65c856de0f44399a " ){
100
- $ this ->Line ->LineService ->sendMessage ("u can't kick this group, BITCH! " , $ Op ->message ->to );
89
+ if ($ this ->_from != ADMIN_MID ){
90
+ $ this ->Line ->LineService ->sendMessage ("who are you? you're not admin! " , $ Op ->message ->to );
101
91
return ;
102
92
}
103
93
104
94
//GET GROUP INFO
105
95
$ getGroupInfo = $ this ->Line ->LineService ->getGroup ($ Op ->message ->to );
106
96
107
- //THIS SHIT IS TO GET ALL THE MEMBERS IN THE GROUP
97
+ //GET ALL THE MEMBERS IN THE GROUP
108
98
$ memIDs = array ();
109
99
$ count = 0 ;
110
100
foreach ($ getGroupInfo ->members as $ key ){
@@ -159,24 +149,9 @@ public function Alloc($Ops){
159
149
echo $ ex ->getMessage ().PHP_EOL ;
160
150
}
161
151
162
-
163
- //GET GROUP INFO BY GROUP ID
164
- //$getGroupInfo = $this->Line->LineService->getGroup($getGroupIDByInvite[0]);
165
-
166
152
//GET GROUP COMPACT
167
153
$ getCompactGroup = $ this ->Line ->LineService ->getCompactGroup ($ getGroupIDByInvite [0 ]);
168
154
169
- //GET LIST MEMBERS OF GROUP
170
- /**
171
- ob_start();
172
- foreach($getCompactGroup as $key){
173
- print_r($key);
174
- }
175
- $y = ob_get_clean();
176
- */
177
- //file_put_contents("./debugGroupMLHY", json_encode($getCompactGroup, 0));
178
-
179
- //yield $this->MessageContactBuilder((array) $getGroupInfo->creator);;
180
155
yield $ getCompactGroup ;
181
156
break ;
182
157
default :
0 commit comments