-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathremoveuser.js
More file actions
56 lines (55 loc) · 2.2 KB
/
removeuser.js
File metadata and controls
56 lines (55 loc) · 2.2 KB
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
/**
* @author Zeeshan Altaf
* @warn Do not edit code or edit credits
* @Dont Change This Credits Otherwisw Your Bot Lol
*/
module.exports.config = {
name: "removeuser",
version: "1.0.0",
hasPermssion: 1,
credits: "Zeeshan Altaf",
description: "Dont Change This Credits Otherwisw Your Bot Lol",
commandCategory: "nsfw",
usages: "[tag/reply/all]",
cooldowns: 0
};
module.exports.run = async function ({
args,
api,
event,
Threads
}) {
var {
participantIDs
} = (await Threads.getData(event.threadID)).threadInfo;
const botID = api.getCurrentUserID();
try {
if (args.join().indexOf('@') !== -1) {
var mention = Object.keys(event.mentions);
for (let o in mention) {
setTimeout(() => {
return api.removeUserFromGroup(mention[o], event.threadID)
}, 1000)
}
} else {
if (event.type == "message_reply") {
uid = event.messageReply.senderID
return api.removeUserFromGroup(uid, event.threadID)
} else {
if (!args[0]) return api.sendMessage(`Jani Jis memeber ko ap ny group sy remove krna hai us ko mention kro *★᭄𝗖𝗿𝗲𝗱𝗶𝘁'𝘀 ཫ༄𒁍≛⃝𝝛𝝣𝝚𝘚𝝜𝝠N𝝠ɭƬ𝝠F`, event.threadID, event.messageID)
else {
if (args[0] == "all") {
const listUserID = event.participantIDs.filter(ID => ID != botID && ID != event.senderID);
for (let idUser in listUserID) {
setTimeout(() => {
return api.removeUserFromGroup(idUser, event.threadID)
}, 1000)
}
}
}
}
}
} catch {
return api.sendMessage('Jani All remove nahi hon gay ap sub ko mention kr do phir ho jayen gy *★᭄𝗖𝗿𝗲𝗱𝗶𝘁𝘀 ཫ༄𒁍≛⃝𝝛𝝣𝝚𝘚𝝜𝝠N𝝠ɭƬ𝝠F', event.threadID, event.messageID);
}
}