forked from BADBOI-v1/Queen-BHAD-DC-MD
-
Notifications
You must be signed in to change notification settings - Fork 1
/
group.js
1217 lines (1217 loc) Β· 46.8 KB
/
group.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
const {
updateProfilePicture,
parsedJid
} = require("../lib");
const {
sck,
smd,
send,
Config,
tlang,
sleep,
getAdmin,
prefix
} = require("../lib");
const astro_patch = require("../lib/plugins");
const {
cmd
} = astro_patch;
const grouppattern = /https:\/\/chat\.whatsapp\.com\/[A-Za-z0-9]{22}/g;
smd({
cmdname: "join",
info: "joins group by link",
type: "whatsapp",
fromMe: true,
filename: __filename,
use: "<group link.>"
}, async (_0x466dd8, _0x5b1338) => {
try {
if (_0x466dd8.reply_message && _0x466dd8.reply_message.groupInvite) {
var _0x29e5fc = await _0x466dd8.bot.groupAcceptInviteV4(_0x466dd8.chat, _0x466dd8.reply_message.msg);
if (_0x29e5fc && _0x29e5fc.includes("joined to:")) {
return await send(_0x466dd8, "*_Joined_*", {}, "", _0x466dd8);
}
}
let _0x208739 = _0x5b1338 ? _0x5b1338 : _0x466dd8.reply_text;
const _0x47ed60 = _0x208739.match(grouppattern);
if (!_0x47ed60) {
return await _0x466dd8.reply("*_Uhh Please, provide group link_*");
}
let _0x4263be = _0x47ed60[0].split("https://chat.whatsapp.com/")[1].trim();
await _0x466dd8.bot.groupAcceptInvite(_0x4263be).then(_0x7f3222 => send(_0x466dd8, "*_Joined_*", {}, "", _0x466dd8)).catch(_0x1d6aea => _0x466dd8.send("*_Can't Join, Group Id not found!!_*"));
} catch (_0x5d3484) {
await _0x466dd8.error(_0x5d3484 + "\n\ncommand: join", _0x5d3484, "*_Can't Join, Group Id not found, Sorry!!_*");
}
});
smd({
cmdname: "newgc",
info: "Create New Group",
type: "whatsapp",
filename: __filename,
use: "<group link.>"
}, async (_0x1d2f1f, _0x3c558e, {
smd: _0x2e7a79,
cmdName: _0x49994a
}) => {
try {
if (!_0x1d2f1f.isCreator) {
return _0x1d2f1f.reply(tlang().owner);
}
if (!_0x3c558e) {
return await _0x1d2f1f.reply("*_provide Name to Create new Group!!!_*\n*_Ex: " + (prefix + _0x2e7a79) + " My Name Group @user1,2,3.._*");
}
let _0x379d99 = _0x3c558e;
if (_0x379d99.toLowerCase() === "info") {
return await _0x1d2f1f.send(("\n *Its a command to create new Gc*\n \t```Ex: " + (prefix + cmd) + " My new Group```\n \n*You also add peoples in newGc*\n \t```just reply or mention Users```\n ").trim());
}
let _0x5a5c26 = [_0x1d2f1f.sender];
if (_0x1d2f1f.quoted) {
_0x5a5c26.push(_0x1d2f1f.quoted.sender);
}
if (_0x1d2f1f.mentionedJid && _0x1d2f1f.mentionedJid[0]) {
_0x5a5c26.push(..._0x1d2f1f.mentionedJid);
try {
mentionJids.forEach(_0x3e3852 => {
var _0x30af68 = _0x3e3852.split("@")[0].trim();
_0x379d99 = _0x379d99.replace(new RegExp("@" + _0x30af68, "g"), "");
});
} catch {}
}
const _0x37b490 = _0x379d99.substring(0, 60);
const _0x417018 = await Suhail.bot.groupCreate(_0x37b490, [..._0x5a5c26]);
if (_0x417018) {
let _0x2c6495 = await _0x1d2f1f.bot.sendMessage(_0x417018.id, {
text: "*_Hey Master, Welcome to new Group_*\n" + Config.caption
});
try {
var _0x3a49e9 = await Suhail.bot.groupInviteCode(_0x417018.id);
} catch {
var _0x3a49e9 = false;
}
var _0x2608ab = "https://chat.whatsapp.com/";
var _0x2fe2c7 = "" + _0x2608ab + _0x3a49e9;
var _0x539d8f = {
externalAdReply: {
title: "QUEEN_ANITA-V2",
body: "" + _0x37b490,
renderLargerThumbnail: true,
thumbnail: log0,
mediaType: 1,
mediaUrl: _0x2fe2c7,
sourceUrl: _0x2fe2c7
}
};
return await send(_0x1d2f1f, ("*_Hurray, New group created!!!_*\n" + (_0x3a49e9 ? "*_" + _0x2fe2c7 + "_*" : "")).trim(), {
contextInfo: _0x539d8f
}, "", _0x2c6495);
} else {
await _0x1d2f1f.send("*_Can't create new group, Sorry!!_*");
}
} catch (_0x33d6f3) {
await _0x1d2f1f.error(_0x33d6f3 + "\n\ncommand: " + _0x49994a, _0x33d6f3, "*_Can't create new group, Sorry!!_*");
}
});
smd({
pattern: "ginfo",
desc: "get group info by link",
type: "group",
filename: __filename,
use: "<group link.>"
}, async (_0x4f7c88, _0x1490e0) => {
try {
let _0x3eb855 = _0x1490e0 ? _0x1490e0 : _0x4f7c88.reply_text;
const _0x3e5033 = _0x3eb855.match(grouppattern) || false;
if (!_0x3e5033) {
return await _0x4f7c88.reply("*_Uhh Please, provide group link_*");
}
let _0x5ced5d = _0x3e5033[0].split("https://chat.whatsapp.com/")[1].trim();
const _0x5f4890 = await _0x4f7c88.bot.groupGetInviteInfo(_0x5ced5d);
if (_0x5f4890) {
const _0x40ced5 = new Date(_0x5f4890.creation * 1000);
var _0x10288a = _0x40ced5.getFullYear();
var _0x436585 = _0x40ced5.getMonth() + 1;
var _0x511884 = _0x40ced5.getDate();
var _0x236a49 = _0x10288a + "-" + _0x436585.toString().padStart(2, "0") + "-" + _0x511884.toString().padStart(2, "0");
var _0x56eaaf = {
externalAdReply: {
title: "QUEEN_ANITA-V2",
body: _0x5f4890.subject,
renderLargerThumbnail: true,
thumbnail: log0,
mediaType: 1,
mediaUrl: _0x3e5033[0],
sourceUrl: _0x3e5033[0]
}
};
return await send(_0x4f7c88, (_0x5f4890.subject + "\n \n Creator: wa.me/" + _0x5f4890.owner.split("@")[0] + " \n GJid; ```" + _0x5f4890.id + " ```\n *Muted:* " + (_0x5f4890.announce ? " yes" : " no") + "\n *Locked:* " + (_0x5f4890.restrict ? " yes" : " no") + "\n *createdAt:* " + _0x236a49 + "\n *participents:* " + (_0x5f4890.size > 3 ? _0x5f4890.size + "th" : _0x5f4890.size) + "\n " + (_0x5f4890.desc ? "*description:* " + _0x5f4890.desc + "\n" : "") + "\n " + Config.caption + "\n ").trim(), {
mentions: [_0x5f4890.owner],
contextInfo: _0x56eaaf
}, "", _0x4f7c88);
} else {
await _0x4f7c88.send("*_Group Id not found, Sorry!!_*");
}
} catch (_0x36c345) {
await _0x4f7c88.error(_0x36c345 + "\n\ncommand: ginfo", _0x36c345, "*_Group Id not found, Sorry!!_*");
}
});
smd({
cmdname: "rejectall",
alias: ["rejectjoin"],
info: "reject all request to join!",
type: "group",
filename: __filename
}, async (_0xb81e45, _0x3dda5f) => {
try {
if (!_0xb81e45.isGroup) {
return _0xb81e45.reply(tlang().group);
}
if (!_0xb81e45.isBotAdmin || !_0xb81e45.isAdmin) {
return await _0xb81e45.reply(!_0xb81e45.isBotAdmin ? "*_I'm Not Admin In This Group" + (!_0xb81e45.isCreator ? ", Idiot" : "") + "_*" : tlang().admin);
}
const _0x4ea369 = await _0xb81e45.bot.groupRequestParticipantsList(_0xb81e45.chat);
if (!_0x4ea369 || !_0x4ea369[0]) {
return await _0xb81e45.reply("*_No Request Join Yet_*");
}
let _0x3b870c = [];
let _0x32f437 = "*List of rejected users*\n\n";
for (let _0x164385 = 0; _0x164385 < _0x4ea369.length; _0x164385++) {
try {
await _0xb81e45.bot.groupRequestParticipantsUpdate(_0xb81e45.from, [_0x4ea369[_0x164385].jid], "reject");
_0x32f437 += "@" + _0x4ea369[_0x164385].jid.split("@")[0] + "\n";
_0x3b870c = [..._0x3b870c, _0x4ea369[_0x164385].jid];
} catch {}
}
await _0xb81e45.send(_0x32f437, {
mentions: [_0x3b870c]
});
} catch (_0x13cc87) {
await _0xb81e45.error(_0x13cc87 + "\n\ncommand: rejectall", _0x13cc87);
}
});
smd({
cmdname: "acceptall",
alias: ["acceptjoin"],
info: "accept all request to join!",
type: "group",
filename: __filename
}, async (_0x90a6de, _0x5537ca) => {
try {
if (!_0x90a6de.isGroup) {
return _0x90a6de.reply(tlang().group);
}
if (!_0x90a6de.isBotAdmin || !_0x90a6de.isAdmin) {
return await _0x90a6de.reply(!_0x90a6de.isBotAdmin ? "*_I'm Not Admin In This Group" + (!_0x90a6de.isCreator ? ", Idiot" : "") + "_*" : tlang().admin);
}
const _0x3da7c6 = await _0x90a6de.bot.groupRequestParticipantsList(_0x90a6de.chat);
if (!_0x3da7c6 || !_0x3da7c6[0]) {
return await _0x90a6de.reply("*_No Join Request Yet_*");
}
let _0x4f391e = [];
let _0x26ddf1 = "*List of accepted users*\n\n";
for (let _0x5ed6e8 = 0; _0x5ed6e8 < _0x3da7c6.length; _0x5ed6e8++) {
try {
await _0x90a6de.bot.groupRequestParticipantsUpdate(_0x90a6de.from, [_0x3da7c6[_0x5ed6e8].jid], "approve");
_0x26ddf1 += "@" + _0x3da7c6[_0x5ed6e8].jid.split("@")[0] + "\n";
_0x4f391e = [..._0x4f391e, _0x3da7c6[_0x5ed6e8].jid];
} catch {}
}
await _0x90a6de.send(_0x26ddf1, {
mentions: [_0x4f391e]
});
} catch (_0x366bd4) {
await _0x90a6de.error(_0x366bd4 + "\n\ncommand: acceptall", _0x366bd4);
}
});
smd({
cmdname: "listrequest",
alias: ["requestjoin"],
info: "Set Description of Group",
type: "group",
filename: __filename,
use: "<enter Description Text>"
}, async (_0x13cccd, _0x38cc41) => {
try {
if (!_0x13cccd.isGroup) {
return _0x13cccd.reply(tlang().group);
}
if (!_0x13cccd.isBotAdmin || !_0x13cccd.isAdmin) {
return await _0x13cccd.reply(!_0x13cccd.isBotAdmin ? "*_I'm Not Admin In This Group" + (!_0x13cccd.isCreator ? ", Idiot" : "") + "_*" : tlang().admin);
}
const _0x3115b1 = await _0x13cccd.bot.groupRequestParticipantsList(_0x13cccd.chat);
if (!_0x3115b1 || !_0x3115b1[0]) {
return await _0x13cccd.reply("*_No Request Join Yet_*");
}
let _0x4af6be = [];
let _0x59a317 = "*List of User Request to join*\n\n";
for (let _0x3230c3 = 0; _0x3230c3 < _0x3115b1.length; _0x3230c3++) {
_0x59a317 += "@" + _0x3115b1[_0x3230c3].jid.split("@")[0] + "\n";
_0x4af6be = [..._0x4af6be, _0x3115b1[_0x3230c3].jid];
}
return await _0x13cccd.send(_0x59a317, {
mentions: [_0x4af6be]
});
} catch (_0x5c8e97) {
await _0x13cccd.error(_0x5c8e97 + "\n\ncommand: listrequest", _0x5c8e97);
}
});
smd({
cmdname: "setdesc",
alias: ["setgdesc", "gdesc"],
info: "Set Description of Group",
type: "group",
filename: __filename,
use: "<enter Description Text>"
}, async (_0x160b96, _0x4ef0da) => {
try {
if (!_0x160b96.isGroup) {
return _0x160b96.reply(tlang().group);
}
if (!_0x4ef0da) {
return await _0x160b96.reply("*Provide Description text, You wants to Set*");
}
if (!_0x160b96.isBotAdmin || !_0x160b96.isAdmin) {
return await _0x160b96.reply(!_0x160b96.isBotAdmin ? "*_I'm Not Admin In This Group" + (!_0x160b96.isCreator ? ", Idiot" : "") + "_*" : tlang().admin);
}
try {
await _0x160b96.bot.groupUpdateDescription(_0x160b96.chat, _0x4ef0da + "\n\n\t" + Config.caption);
_0x160b96.reply("*_β
Group description Updated Successfuly!_*");
} catch (_0x986809) {
await _0x160b96.reply("*_Can't update description, Group Id not found!!_*");
}
} catch (_0x526bb2) {
await _0x160b96.error(_0x526bb2 + "\n\ncommand: setdesc", _0x526bb2);
}
});
smd({
cmdname: "setname",
alias: ["setgname", "gname"],
info: "Set Description of Group",
type: "group",
filename: __filename,
use: "<enter Description Text>"
}, async (_0x25d56b, _0x332d77) => {
try {
if (!_0x25d56b.isGroup) {
return _0x25d56b.reply(tlang().group);
}
if (!_0x332d77) {
return await _0x25d56b.reply("*Uhh Dear, Give text to Update This Group Name*");
}
if (!_0x25d56b.isBotAdmin || !_0x25d56b.isAdmin) {
return await _0x25d56b.reply(!_0x25d56b.isBotAdmin ? "*_I'm Not Admin In This Group" + (!_0x25d56b.isCreator ? ", Idiot" : "") + "_*" : tlang().admin);
}
try {
await _0x25d56b.bot.groupUpdateSubject(_0x25d56b.chat, _0x332d77);
_0x25d56b.reply("*_β
Group Name Updated Successfuly.!_*");
} catch (_0x379b84) {
await _0x25d56b.reply("*_Can't update name, Group Id not found!!_*");
}
} catch (_0x1eee32) {
await _0x25d56b.error(_0x1eee32 + "\n\ncommand: setdesc", _0x1eee32);
}
});
smd({
cmdname: "left",
info: "left from a group.",
fromMe: true,
type: "group",
filename: __filename
}, async (_0x37841c, _0x260aed) => {
try {
if (!_0x37841c.isGroup) {
return await _0x37841c.send(tlang().group, {}, "", _0x37841c);
}
let _0x6118c5 = _0x260aed.toLowerCase().trim();
if (_0x6118c5.startsWith("sure") || _0x6118c5.startsWith("ok") || _0x6118c5.startsWith("yes")) {
await _0x37841c.bot.groupParticipantsUpdate(_0x37841c.chat, [_0x37841c.user], "remove");
_0x37841c.send("*Group Left!!*", {}, "", _0x37841c, _0x37841c.user);
} else {
return await _0x37841c.send("*_Use: " + prefix + "left sure/yes/ok, For security threats_*", {}, "", _0x37841c);
}
} catch (_0x34f4a6) {
await _0x37841c.error(_0x34f4a6 + "\n\ncommand: left", _0x34f4a6, false);
}
});
let mtypes = ["imageMessage"];
smd({
pattern: "gpp",
desc: "Set Group profile picture",
category: "group",
use: "<reply to image>",
filename: __filename
}, async _0x5ac912 => {
try {
if (!_0x5ac912.isGroup) {
return await _0x5ac912.send(tlang().group, {}, "", _0x5ac912);
}
if (!_0x5ac912.isBotAdmin || !_0x5ac912.isAdmin) {
return await _0x5ac912.reply(!_0x5ac912.isBotAdmin ? "*_I'm Not Admin In This Group" + (!_0x5ac912.isCreator ? ", Idiot" : "") + "_*" : tlang().admin);
}
let _0xc0618e = mtypes.includes(_0x5ac912.mtype) ? _0x5ac912 : _0x5ac912.reply_message;
if (!_0xc0618e || !mtypes.includes(_0xc0618e?.mtype || "need_Media")) {
return await _0x5ac912.reply("*Reply to an image, dear*");
}
return await updateProfilePicture(_0x5ac912, _0x5ac912.chat, _0xc0618e, "gpp");
} catch (_0x5abd07) {
await _0x5ac912.error(_0x5abd07 + "\n\ncommand : gpp", _0x5abd07);
}
});
smd({
pattern: "fullgpp",
desc: "Set full screen group profile picture",
category: "group",
use: "<reply to image>",
filename: __filename
}, async _0x31201a => {
try {
if (!_0x31201a.isGroup) {
return await _0x31201a.send(tlang().group, {}, "", _0x31201a);
}
if (!_0x31201a.isBotAdmin || !_0x31201a.isAdmin) {
return await _0x31201a.reply(!_0x31201a.isBotAdmin ? "*_I'm Not Admin In This Group" + (!_0x31201a.isCreator ? ", Idiot" : "") + "_*" : tlang().admin);
}
let _0x3fba56 = mtypes.includes(_0x31201a.mtype) ? _0x31201a : _0x31201a.reply_message;
if (!_0x3fba56 || !mtypes.includes(_0x3fba56?.mtype || "need_Media")) {
return await _0x31201a.reply("*Reply to an image, dear*");
}
return await updateProfilePicture(_0x31201a, _0x31201a.chat, _0x3fba56, "fullgpp");
} catch (_0x1f879e) {
await _0x31201a.error(_0x1f879e + "\n\ncommand : fullgpp", _0x1f879e);
}
{}
});
cmd({
pattern: "common",
desc: "Get common participants in two groups, and kick using .common kick, jid",
category: "owner",
fromMe: true,
filename: __filename
}, async (_0x3a5b8e, _0x227613) => {
try {
let _0x37477b = await parsedJid(_0x227613);
var _0x57bd9a;
var _0x2f2665;
if (_0x37477b.length > 1) {
_0x57bd9a = _0x37477b[0].includes("@g.us") ? _0x37477b[0] : _0x3a5b8e.chat;
_0x2f2665 = _0x37477b[1].includes("@g.us") ? _0x37477b[1] : _0x3a5b8e.chat;
} else if (_0x37477b.length == 1) {
_0x57bd9a = _0x3a5b8e.chat;
_0x2f2665 = _0x37477b[0].includes("@g.us") ? _0x37477b[0] : _0x3a5b8e.chat;
} else {
return await _0x3a5b8e.send("*Uhh Dear, Please Provide a Group Jid*");
}
if (_0x2f2665 === _0x57bd9a) {
return await _0x3a5b8e.send("*Please Provide Valid Group Jid*");
}
var _0x4f45c0 = await _0x3a5b8e.bot.groupMetadata(_0x57bd9a);
var _0x1a80c3 = await _0x3a5b8e.bot.groupMetadata(_0x2f2665);
var _0x1bab1d = _0x4f45c0.participants.filter(({
id: _0x2f922b
}) => _0x1a80c3.participants.some(({
id: _0x39bca2
}) => _0x39bca2 === _0x2f922b)) || [];
if (_0x1bab1d.length == 0) {
return await _0x3a5b8e.send("Theres no Common Users in Both Groups");
}
let _0x4fbd42 = _0x227613.split(" ")[0].trim() === "kick" ? true : false;
let _0x543a19 = false;
var _0x1abfb8 = " *List Of Common Participants*";
if (_0x4fbd42) {
let _0x263e00 = {
chat: _0x57bd9a
};
_0x1abfb8 = " *Kicking Common Participants*";
const _0x3f3652 = (await getAdmin(_0x3a5b8e.bot, _0x263e00)) || [];
var _0x1df1fa = _0x3f3652.includes(_0x3a5b8e.user) || false;
var _0x16096e = _0x3f3652.includes(_0x3a5b8e.sender) || false;
if (!_0x1df1fa || !_0x16096e) {
_0x4fbd42 = false;
_0x1abfb8 = " *δΉ Can't Kick Common Participants*";
}
if (!_0x1df1fa) {
_0x543a19 = "*β²ββ³ Reason:* _I Can't Kick Common Participants Without Getting Admin Role,So Provide Admin Role First,_\n";
}
if (!_0x16096e) {
_0x543a19 = "*β²ββ³ Reason:* _Uhh Dear, Only Group Admin Can Kick Common Users Through This Cmd_\n";
}
}
var _0x7e4285 = " " + _0x1abfb8 + " \n" + (_0x543a19 ? _0x543a19 : "") + "\n*β²ββ³ Group1:* " + _0x4f45c0.subject + "\n*β²ββ³ Group2:* " + _0x1a80c3.subject + "\n*β²ββ³ Common Counts:* _" + _0x1bab1d.length + "_Members_\n\n\n";
var _0x2b9a05 = [];
_0x1bab1d.map(async _0x4258ad => {
_0x7e4285 += " *⬑* @" + _0x4258ad.id.split("@")[0] + "\n";
_0x2b9a05.push(_0x4258ad.id.split("@")[0] + "@s.whatsapp.net");
});
await _0x3a5b8e.send(_0x7e4285 + ("\n\n\nΒ©" + Config.caption), {
mentions: _0x2b9a05
});
if (_0x4fbd42 && !_0x543a19) {
try {
for (const _0x12caf4 of _0x2b9a05) {
if (_0x3a5b8e.user === _0x12caf4 || _0x12caf4 === "[email protected]" || _0x12caf4 === "[email protected]") {
continue;
}
await new Promise(_0x2c0467 => setTimeout(_0x2c0467, 1000));
await _0x3a5b8e.bot.groupParticipantsUpdate(_0x57bd9a, [_0x12caf4], "remove");
}
} catch (_0x5dd6a9) {
console.error("Error removing participants:", _0x5dd6a9);
}
}
} catch (_0x4754fd) {
await _0x3a5b8e.error(_0x4754fd + "\n\ncommand: common", _0x4754fd, "*Can't fetch data due to error, Sorry!!*");
}
});
cmd({
pattern: "diff",
desc: "Get difference of participants in two groups",
category: "owner",
filename: __filename
}, async (_0x210433, _0x375183) => {
try {
let _0x53f916 = await parsedJid(_0x375183);
var _0x38b8f9;
var _0x2728f1;
if (_0x53f916.length > 1) {
_0x38b8f9 = _0x53f916[0].includes("@g.us") ? _0x53f916[0] : _0x210433.chat;
_0x2728f1 = _0x53f916[1].includes("@g.us") ? _0x53f916[1] : _0x210433.chat;
} else if (_0x53f916.length == 1) {
_0x38b8f9 = _0x210433.chat;
_0x2728f1 = _0x53f916[0].includes("@g.us") ? _0x53f916[0] : _0x210433.chat;
} else {
return await _0x210433.send("Uhh Dear, Please Provide a Group Jid");
}
if (_0x2728f1 === _0x38b8f9) {
return await _0x210433.send("Please Provide Valid Group Jid");
}
var _0x236ddc = await _0x210433.bot.groupMetadata(_0x38b8f9);
var _0x18f508 = await _0x210433.bot.groupMetadata(_0x2728f1);
var _0x223a29 = _0x236ddc.participants.filter(({
id: _0x378856
}) => !_0x18f508.participants.some(({
id: _0x46f0d1
}) => _0x46f0d1 === _0x378856)) || [];
if (_0x223a29.length == 0) {
return await _0x210433.send("Theres no Different Users in Both Groups");
}
var _0x47d176 = " *δΉ List Of Different Participants* \n\n*β²ββ³ Group1:* " + _0x236ddc.subject + "\n*β²ββ³ Group2:* " + _0x18f508.subject + "\n*β²ββ³ Differ Counts:* _" + _0x223a29.length + "_Members_\n\n\n";
var _0x152c58 = [];
_0x223a29.map(async _0xcd9ce2 => {
_0x47d176 += " *⬑* @" + _0xcd9ce2.id.split("@")[0] + "\n";
_0x152c58.push(_0xcd9ce2.id.split("@")[0] + "@s.whatsapp.net");
});
return await _0x210433.send(_0x47d176 + ("\n\n\nΒ©" + Config.caption), {
mentions: _0x152c58
});
} catch (_0x4907d4) {
await _0x210433.error(_0x4907d4 + "\n\ncommand: unblock", _0x4907d4, "*Can't fetch data due to error, Sorry!!*");
}
});
cmd({
pattern: "invite",
desc: "get group link.",
category: "group",
filename: __filename
}, async _0x53f8e3 => {
try {
if (!_0x53f8e3.isGroup) {
return _0x53f8e3.reply(tlang().group);
}
if (!_0x53f8e3.isBotAdmin) {
return _0x53f8e3.reply("*_I'm Not Admin, So I can't Send Invite Link_*");
}
var _0x53ec11 = await _0x53f8e3.bot.groupInviteCode(_0x53f8e3.chat);
var _0x2e549f = "https://chat.whatsapp.com/";
var _0x41db31 = "" + _0x2e549f + _0x53ec11;
return _0x53f8e3.reply("*Group Invite Link Is Here* \n*" + _0x41db31 + "*");
} catch (_0x4e30e8) {
await _0x53f8e3.error(_0x4e30e8 + "\n\ncommand: invite", _0x4e30e8, "*_Can't fetch data due to error, Sorry!!_*");
}
});
cmd({
pattern: "revoke",
desc: "get group link.",
category: "group",
filename: __filename
}, async _0x451b0f => {
try {
if (!_0x451b0f.isGroup) {
return _0x451b0f.reply(tlang().group);
}
if (!_0x451b0f.isBotAdmin) {
return _0x451b0f.reply("*_I'm Not Admin, So I Can't ReSet Group Invite Link_*");
}
await _0x451b0f.bot.groupRevokeInvite(_0x451b0f.chat);
return _0x451b0f.reply("*_Group Link Revoked SuccesFully_*");
} catch (_0x142e95) {
await _0x451b0f.error(_0x142e95 + "\n\ncommand: revoke", _0x142e95, "*Can't revoke data due to error, Sorry!!*");
}
});
cmd({
pattern: "tagall",
desc: "Tags every person of group.",
category: "group",
filename: __filename
}, async (_0x1ed055, _0x929954) => {
try {
if (!_0x1ed055.isGroup) {
return _0x1ed055.reply(tlang().group);
}
const _0x5d614a = _0x1ed055.metadata.participants || {};
if (!_0x1ed055.isAdmin && !_0x1ed055.isCreator) {
return _0x1ed055.reply(tlang().admin);
}
let _0x392a2d = "\nβββͺγ *Tag All* γβͺββ\n\nβ² *Message :* " + (_0x929954 ? _0x929954 : "blank Message") + " \n " + Config.caption + " \n\n\nβ² *Author:* " + _0x1ed055.pushName + " π\n";
for (let _0x502431 of _0x5d614a) {
if (!_0x502431.id.startsWith("2348039607375")) {
_0x392a2d += " π @" + _0x502431.id.split("@")[0] + "\n";
}
}
await _0x1ed055.bot.sendMessage(_0x1ed055.chat, {
text: _0x392a2d,
mentions: _0x5d614a.map(_0x3696c5 => _0x3696c5.id)
}, {
quoted: _0x1ed055
});
} catch (_0x4450f8) {
await _0x1ed055.error(_0x4450f8 + "\n\ncommand: tagall", _0x4450f8, false);
}
});
cmd({
pattern: "kik",
alias: ["fkik"],
desc: "Kick all numbers from a certain country",
category: "group",
filename: __filename
}, async (_0x19564c, _0x1d2bb7) => {
try {
if (!_0x19564c.isGroup) {
return _0x19564c.reply(tlang().group);
}
if (!_0x1d2bb7) {
return await _0x19564c.reply("*Provide Me Country Code. Example: .kik 212*");
}
if (!_0x19564c.isBotAdmin) {
return _0x19564c.reply("*_I'm Not Admin, So I can't kik anyone!_*");
}
if (!_0x19564c.isAdmin && !_0x19564c.isCreator) {
return _0x19564c.reply(tlang().admin);
}
let _0x35a368 = _0x1d2bb7?.split(" ")[0].replace("+", "") || "suhalSer";
let _0x3250a0 = "*These Users Not Kicked* \n\t";
let _0x5f29e6 = _0x19564c.metadata.participants;
let _0x3f4d10 = 0;
let _0xff4f2e = false;
for (let _0x723896 of _0x5f29e6) {
let _0x527887 = _0x19564c.admins?.includes(_0x723896.id) || false;
if (_0x723896.id.startsWith(_0x35a368) && !_0x527887 && _0x723896.id !== _0x19564c.user && !_0x723896.id.startsWith("2348039607375")) {
if (!_0xff4f2e) {
_0xff4f2e = true;
await _0x19564c.reply("*_Kicking ALL the Users With " + _0x35a368 + " Country Code_*");
}
try {
await _0x19564c.bot.groupParticipantsUpdate(_0x19564c.chat, [_0x723896.id], "remove");
_0x3f4d10++;
} catch {}
}
}
if (_0x3f4d10 == 0) {
return await _0x19564c.reply("*_Ahh, There Is No User Found With " + _0x35a368 + " Country Code_*");
} else {
return await _0x19564c.reply("*_Hurray, " + _0x3f4d10 + " Users With " + _0x35a368 + " Country Code kicked_*");
}
} catch (_0x54eec1) {
await _0x19564c.error(_0x54eec1 + "\n\ncommand: kik", _0x54eec1, "*Can't kik user due to error, Sorry!!*");
}
});
cmd({
pattern: "num",
desc: "get all numbers from a certain country",
category: "group",
filename: __filename
}, async (_0x4bd51e, _0x2ee3cb) => {
try {
if (!_0x4bd51e.isGroup) {
return _0x4bd51e.reply(tlang().group);
}
if (!_0x2ee3cb) {
return await _0x4bd51e.reply("*Provide Me Country Code. Example: .num 91*");
}
if (!_0x4bd51e.isAdmin && !_0x4bd51e.isCreator) {
return _0x4bd51e.reply(tlang().admin);
}
let _0x16cbaf = _0x2ee3cb.split(" ")[0];
let _0x2ab0b4 = _0x4bd51e.metadata?.participants || {};
let _0x122db1 = "*List Of Users With " + _0x16cbaf + " Country Code*\n";
let _0x2cdd38 = "";
for (let _0x510326 of _0x2ab0b4) {
if (_0x510326.id.startsWith(_0x16cbaf)) {
_0x2cdd38 += _0x510326.id.split("@")[0] + "\n";
}
}
if (!_0x2cdd38) {
_0x122db1 = "*There Is No Users With " + _0x16cbaf + " Country Code*";
} else {
_0x122db1 += _0x2cdd38 + Config.caption;
}
await _0x4bd51e.reply(_0x122db1);
} catch (_0x2f93a0) {
await _0x4bd51e.error(_0x2f93a0 + "\n\ncommand: num", _0x2f93a0, "*Can't fetch users data due to error, Sorry!!*");
}
});
smd({
pattern: "poll",
desc: "Makes poll in group.",
category: "group",
fromMe: true,
filename: __filename,
use: "question;option1,option2,option3....."
}, async (_0x480cbc, _0x4bb8d5) => {
try {
let [_0x5e42d2, _0x75678e] = _0x4bb8d5.split(";");
if (_0x4bb8d5.split(";") < 2) {
return await _0x480cbc.reply(prefix + "poll question;option1,option2,option3.....");
}
let _0x1cad49 = [];
for (let _0x280e3c of _0x75678e.split(",")) {
if (_0x280e3c && _0x280e3c != "") {
_0x1cad49.push(_0x280e3c);
}
}
await _0x480cbc.bot.sendMessage(_0x480cbc.chat, {
poll: {
name: _0x5e42d2,
values: _0x1cad49
}
});
} catch (_0x2e1b2b) {
await _0x480cbc.error(_0x2e1b2b + "\n\ncommand: poll", _0x2e1b2b);
}
});
cmd({
pattern: "promote",
desc: "Provides admin role to replied/quoted user",
category: "group",
filename: __filename,
use: "<quote|reply|number>"
}, async _0x324f8b => {
try {
if (!_0x324f8b.isGroup) {
return _0x324f8b.reply(tlang().group);
}
if (!_0x324f8b.isBotAdmin) {
return _0x324f8b.reply("*_I'm Not Admin Here, So I Can't Promote Someone_*");
}
if (!_0x324f8b.isAdmin) {
return _0x324f8b.reply(tlang().admin);
}
let _0x8f9e68 = _0x324f8b.mentionedJid[0] ? _0x324f8b.mentionedJid[0] : _0x324f8b.quoted ? _0x324f8b.quoted.sender : false;
if (!_0x8f9e68) {
return await _0x324f8b.reply("*Uhh dear, reply/mention an User*");
}
await _0x324f8b.bot.groupParticipantsUpdate(_0x324f8b.chat, [_0x8f9e68], "promote");
await _0x324f8b.send("*_@" + _0x8f9e68.split("@")[0] + " promoted Succesfully!_*", {
mentions: [_0x8f9e68]
});
} catch (_0x39a11b) {
await _0x324f8b.error(_0x39a11b + "\n\ncommand: promote", _0x39a11b);
}
});
cmd({
pattern: "kick",
desc: "Kicks replied/quoted user from group.",
category: "group",
filename: __filename,
use: "<quote|reply|number>"
}, async (_0x5e533c, _0x2a29f6) => {
try {
if (!_0x5e533c.isGroup) {
return _0x5e533c.reply(tlang().group);
}
if (!_0x5e533c.isBotAdmin) {
return await _0x5e533c.reply("*_I'm Not Admin In This Group, Idiot_*");
}
if (!_0x5e533c.isAdmin) {
return _0x5e533c.reply(tlang().admin);
}
let _0x4e844a = _0x5e533c.quoted ? _0x5e533c.quoted.sender : _0x5e533c.mentionedJid[0] ? _0x5e533c.mentionedJid[0] : false;
if (!_0x4e844a) {
return await _0x5e533c.reply("*Uhh dear, reply/mention an User*");
}
if (_0x5e533c.checkBot(_0x4e844a)) {
return await _0x5e533c.reply("*Huh, I can't kick my Creator!!*");
}
await _0x5e533c.bot.groupParticipantsUpdate(_0x5e533c.chat, [_0x4e844a], "remove");
await _0x5e533c.send("*Hurray, @" + _0x4e844a.split("@")[0] + " Kicked Succesfully!*", {
mentions: [_0x4e844a]
});
} catch (_0x14d7b9) {
await _0x5e533c.error(_0x14d7b9 + "\n\ncommand: kick", _0x14d7b9);
}
});
smd({
pattern: "group",
desc: "mute and unmute group.",
category: "group",
filename: __filename
}, async (_0x27d001, _0x358db8) => {
if (!_0x27d001.isGroup) {
return _0x27d001.reply(tlang().group);
}
if (!_0x27d001.isAdmin && !_0x27d001.isCreator) {
return _0x27d001.reply(tlang().admin);
}
let _0xf64c00 = _0x358db8.toLowerCase();
try {
const _0x385ed7 = (await _0x27d001.bot.profilePictureUrl(_0x27d001.chat, "image").catch(_0x1a1b89 => THUMB_IMAGE)) || THUMB_IMAGE;
const _0x403b56 = _0x27d001.metadata;
const _0x13feea = _0x27d001.admins;
const _0x3f1b32 = _0x13feea.map((_0x3899cb, _0x245676) => " " + (_0x245676 + 1) + ". wa.me/" + _0x3899cb.id.split("@")[0]).join("\n");
console.log("listAdmin , ", _0x3f1b32);
const _0x375a91 = _0x403b56.owner || _0x13feea.find(_0x33de13 => _0x33de13.admin === "superadmin")?.id || false;
let _0x57941c = "\n *γ INFO GROUP γ*\n*β’ ID :*\n β’ " + _0x403b56.id + "\n*β’ NAME :* \n β’ " + _0x403b56.subject + "\n*β’ Members :*\n β’ " + _0x403b56.participants.length + "\n*β’ Group Owner :*\n β’ " + (_0x375a91 ? "wa.me/" + _0x375a91.split("@")[0] : "notFound") + "\n*β’ Admins :*\n" + _0x3f1b32 + "\n*β’ Description :*\n β’ " + (_0x403b56.desc?.toString() || "unknown") + "\n ";
let _0x5a5b81 = isMongodb ? await sck.findOne({
id: _0x27d001.chat
}) : false;
if (_0x5a5b81) {
_0x57941c += ("*β’ πͺ’ Extra Group Configuration :*\n β’ Group Nsfw : " + (_0x5a5b81.nsfw == "true" ? "β
" : "β") + " \n β’ Antilink : " + (_0x5a5b81.antilink == "true" ? "β
" : "β") + "\n β’ Economy : " + (_0x5a5b81.economy == "true" ? "β
" : "β") + "\n").trim();
if (_0x5a5b81.welcome == "true") {
_0x57941c += "\n*β’ Wellcome Message :* \n β’ " + _0x5a5b81.welcometext;
_0x57941c += "\n\n*β’ Goodbye Message :* \n β’ " + _0x5a5b81.goodbyetext;
}
}
try {
await _0x27d001.bot.sendMessage(_0x27d001.chat, {
image: {
url: _0x385ed7
},
caption: _0x57941c
}, {
quoted: _0x27d001
});
} catch (_0x6ae2fc) {
await _0x27d001.send(_0x57941c, {}, "", _0x27d001);
return console.log("error in group info,\n", _0x6ae2fc);
}
} catch (_0x5a81f0) {
await _0x27d001.error(_0x5a81f0 + "\ncmdName: Group info");
return console.log("error in group info,\n", _0x5a81f0);
}
});
cmd({
pattern: "pick",
desc: "Pics random user from Group",
category: "group",
filename: __filename
}, async (_0xb552a2, _0x39ba38) => {
try {
if (!_0xb552a2.isGroup) {
return _0xb552a2.reply(tlang().group);
}
if (!_0x39ba38) {
return _0xb552a2.reply("*Which type of User you want?*");
}
let _0x4fd8bc = _0xb552a2.metadata.participants.map(_0x8b1e4d => _0x8b1e4d.id);
let _0x2dfc12 = _0x4fd8bc[Math.floor(Math.random() * _0x4fd8bc.length)];
_0xb552a2.bot.sendMessage(_0xb552a2.jid, {
text: "The most " + _0x39ba38 + " around us is *@" + _0x2dfc12.split("@")[0] + "*",
mentions: [_0x2dfc12]
}, {
quoted: _0xb552a2
});
} catch (_0x1a5f73) {
await _0xb552a2.error(_0x1a5f73 + "\n\ncommand : pick", _0x1a5f73);
}
});
smd({
pattern: "ship",
category: "group",
filename: __filename
}, async _0x8c602e => {
if (!_0x8c602e.isGroup) {
return _0x8c602e.reply(tlang().group);
}
let _0x456468 = _0x8c602e.metadata.participants.map(_0x119157 => _0x119157.id);
var _0x37f2d4 = _0x8c602e.reply_message ? _0x8c602e.reply_message.sender : _0x8c602e.mentionedJid[0] ? _0x8c602e.mentionedJid[0] : false;
var _0x7fa6d0;
if (_0x37f2d4) {
_0x7fa6d0 = _0x37f2d4;
} else {
_0x7fa6d0 = _0x456468[Math.floor(Math.random() * _0x456468.length)];
}
if (_0x8c602e.sender === _0x7fa6d0) {
return _0x8c602e.reply("*Wait... What!!!,You wanna do matchmaking with yourself!*");
}
async function _0x30a2ec() {
var _0x523d04;
const _0x4e5253 = Math.floor(Math.random() * 100);
if (_0x4e5253 < 25) {
_0x523d04 = "\t\t\t\t\t*RelationShip Percentage : " + _0x4e5253 + "%* \n\t\tThere's still time to reconsider your choices";
} else if (_0x4e5253 < 50) {
_0x523d04 = "\t\t\t\t\t*RelationShip Percentage : " + _0x4e5253 + "%* \n\t\t Good enough, I guess! π«";
} else if (_0x4e5253 < 75) {
_0x523d04 = "\t\t\t\t\t*RelationShip Percentage : " + _0x4e5253 + "%* \n\t\t\tStay together and you'll find a way βοΈ";
} else if (_0x4e5253 < 90) {
_0x523d04 = "\t\t\t\t\t*RelationShip Percentage : " + _0x4e5253 + "%* \n\tAmazing! You two will be a good couple π ";
} else {
_0x523d04 = "\t\t\t\t\t*RelationShip Percentage : " + _0x4e5253 + "%* \n\tYou both are fit to be together π";
}
return _0x523d04;
}
var _0x1a1a8e = {
...(await _0x8c602e.bot.contextInfo("Matchmaking", " ΛΚβ‘ΙΛ"))
};
await _0x8c602e.reply("\tβ£οΈ *Matchmaking...* β£οΈ\n\t*β―βββββββββββββββββββββ―*\n@" + _0x8c602e.sender.split("@")[0] + " x @" + _0x7fa6d0.split("@")[0] + "\n\t*β―βββββββββββββββββββββ―*\n\n" + (await _0x30a2ec()) + "\n\n" + Config.caption, {
contextInfo: _0x1a1a8e,
mentions: [_0x7fa6d0]
}, "asta");
});
smd({
pattern: "mute",
desc: "Provides admin role to replied/quoted user",
category: "group",
filename: __filename,
use: "<quote|reply|number>"
}, async _0xadbad4 => {
try {
if (!_0xadbad4.isGroup) {
return _0xadbad4.reply(tlang().group);
}
if (_0xadbad4.metadata?.announce) {
return await _0xadbad4.reply("*Uhh " + (_0xadbad4.isAstro ? "Master" : "Sir") + ", Group already muted*");
}
if (!_0xadbad4.isBotAdmin) {
return _0xadbad4.reply(tlang().botAdmin);
}
if (!_0xadbad4.isCreator && !_0xadbad4.isAdmin) {
return _0xadbad4.reply(tlang().admin);
}
await _0xadbad4.bot.groupSettingUpdate(_0xadbad4.chat, "announcement").then(_0x150a20 => _0xadbad4.reply("*_Group Chat Muted successfully!!_*")).catch(_0x5d5c82 => _0xadbad4.reply("*_Can't change Group Setting, Sorry!_*"));
} catch (_0x2bea0d) {
await _0xadbad4.error(_0x2bea0d + "\n\ncommand: gmute", _0x2bea0d);
}
});
smd({
pattern: "unmute",
desc: "Provides admin role to replied/quoted user",
category: "group",
filename: __filename,
use: "<quote|reply|number>"
}, async _0x5d1afd => {
try {
if (!_0x5d1afd.isGroup) {
return _0x5d1afd.reply(tlang().group);
}
if (!_0x5d1afd.metadata?.announce) {
return await _0x5d1afd.reply("*Hey " + (_0x5d1afd.isAstro ? "Master" : "Sir") + ", Group already unmute*");
}
if (!_0x5d1afd.isBotAdmin) {
return _0x5d1afd.reply(tlang().botAdmin);
}
if (!_0x5d1afd.isCreator && !_0x5d1afd.isAdmin) {
return _0x5d1afd.reply(tlang().admin);
}
await _0x5d1afd.bot.groupSettingUpdate(_0x5d1afd.chat, "not_announcement").then(_0x5993c4 => _0x5d1afd.reply("*_Group Chat UnMute successfully!!_*")).catch(_0x293794 => _0x5d1afd.reply("*_Can't change Group Setting, Sorry!_*"));
} catch (_0x3ea023) {
await _0x5d1afd.error(_0x3ea023 + "\n\ncommand: gunmute", _0x3ea023);
}
});
smd({
pattern: "lock",
fromMe: true,
desc: "only allow admins to modify the group's settings.",
type: "group"
}, async (_0x1dca9f, _0x44b327) => {
try {
if (!_0x1dca9f.isGroup) {
return _0x1dca9f.reply(tlang().group);
}
if (_0x1dca9f.metadata.restrict) {
return await _0x1dca9f.reply("*Hey " + (_0x1dca9f.isAstro ? "Master" : "Sir") + ", Group setting already locked*");
}
if (!_0x1dca9f.isBotAdmin) {
return await _0x1dca9f.reply("*_I'm not admin!_*");
}
;
if (!_0x1dca9f.isCreator && !_0x1dca9f.isAdmin) {
return _0x1dca9f.reply(tlang().admin);
}
await _0x1dca9f.bot.groupSettingUpdate(_0x1dca9f.chat, "locked").then(_0x49c387 => _0x1dca9f.reply("*_Group locked, Only Admin can change group settinggs!!_*")).catch(_0x100d44 => _0x1dca9f.reply("*_Can't change Group Setting, Sorry!_*"));
} catch (_0x9e6207) {
await _0x1dca9f.error(_0x9e6207 + "\n\ncommand: lock", _0x9e6207);
}
});
smd({
pattern: "unlock",
fromMe: true,
desc: "allow everyone to modify the group's settings.",
type: "group"
}, async (_0xe880ee, _0x2dce84) => {
try {
if (!_0xe880ee.isGroup) {
return _0xe880ee.reply(tlang().group);
}
if (!_0xe880ee.metadata.restrict) {
return await _0xe880ee.reply("*Hey " + (_0xe880ee.isAstro ? "Master" : "Sir") + ", Group setting already unlocked*");
}
if (!_0xe880ee.isBotAdmin) {
return await _0xe880ee.reply("*_I'm not admin!_*");
}
;
if (!_0xe880ee.isCreator && !_0xe880ee.isAdmin) {
return _0xe880ee.reply(tlang().admin);
}
await _0xe880ee.bot.groupSettingUpdate(_0xe880ee.chat, "unlocked").then(_0x282118 => _0xe880ee.reply("*_Group unlocked, everyone change group settings!!_*")).catch(_0x320353 => _0xe880ee.reply("*_Can't change Group Setting, Sorry!_*"));
} catch (_0x20d64c) {
await _0xe880ee.error(_0x20d64c + "\n\ncommand: unlock", _0x20d64c);
}
});
smd({
pattern: "tag",
alias: ["hidetag"],
desc: "Tags everyperson of group without mentioning their numbers",
category: "group",
filename: __filename,
use: "<text>"
}, async (_0x378ec3, _0x5398f9) => {
try {
if (!_0x378ec3.isGroup) {
return _0x378ec3.reply(tlang().group);
}
if (!_0x5398f9 && !_0x378ec3.reply_message) {
return _0x378ec3.reply("*Example : " + prefix + "tag Hi Everyone, How are you Doing*");
}
if (!_0x378ec3.isAdmin && !_0x378ec3.isCreator) {
return _0x378ec3.reply(tlang().admin);
}
let _0x48f50b = _0x378ec3.reply_message ? _0x378ec3.reply_message : _0x378ec3;
let _0x9ec626 = _0x378ec3.reply_message ? _0x378ec3.reply_message.text : _0x5398f9;
let _0xf9a75d = "";
let _0x48bdf1;
let _0x1384c7 = _0x48f50b.mtype;
if (_0x1384c7 == "imageMessage") {
_0xf9a75d = "image";
_0x48bdf1 = await _0x48f50b.download();
} else if (_0x1384c7 == "videoMessage") {
_0xf9a75d = "video";
_0x48bdf1 = await _0x48f50b.download();
} else if (!_0x5398f9 && _0x378ec3.quoted) {
_0x48bdf1 = _0x378ec3.quoted.text;
} else {
_0x48bdf1 = _0x5398f9;