mirai
command
antileave
No description
0
views
0
likes
0
installs
raw source
const { getTime } = global.utils;
module.exports = {
config: {
name: "antileave",
version: "2.5",
author: "EryXenX",
category: "events"
},
onStart: async ({ api, event, usersData, message }) => {
if (event.logMessageType !== "log:unsubscribe") return;
const { threadID, logMessageData, author } = event;
const leftID = logMessageData.leftParticipantFbId;
if (leftID === author) {
const userName = await usersData.getName(leftID);
const boldMap = {
A: "๐", B: "๐", C: "๐", D: "๐", E: "๐", F: "๐", G: "๐", H: "๐", I: "๐", J: "๐",
K: "๐", L: "๐", M: "๐ ", N: "๐ก", O: "๐ข", P: "๐ฃ", Q: "๐ค", R: "๐ฅ", S: "๐ฆ", T: "๐ง",
U: "๐จ", V: "๐ฉ", W: "๐ช", X: "๐ซ", Y: "๐ฌ", Z: "๐ญ",
a: "๐ฎ", b: "๐ฏ", c: "๐ฐ", d: "๐ฑ", e: "๐ฒ", f: "๐ณ", g: "๐ด", h: "๐ต", i: "๐ถ", j: "๐ท",
k: "๐ธ", l: "๐น", m: "๐บ", n: "๐ป", o: "๐ผ", p: "๐ฝ", q: "๐พ", r: "๐ฟ", s: "๐", t: "๐",
u: "๐", v: "๐", w: "๐", x: "๐
", y: "๐", z: "๐"
};
const boldName = userName.split("").map(c => boldMap[c] || c).join("");
const form = {
body: `๐น ${boldName} tried to leave...
๐ซ Not allowed here!
๐ Added back ๐`
};
try {
await api.addUserToGroup(leftID, threadID);
await message.send(form);
} catch (err) {}
}
}
};