// code from goatstore // api: https://store.agi.bd module.exports = { config: { name: "antileave", version: "1.0", author: "Zihad", category: "events" }, onStart: async ({ event, api, message, usersData }) => { // কেউ গ্রুপ ছাড়লে বা রিমুভ হলে এই ইভেন্ট আসে if (event.logMessageType !== "log:unsubscribe") return; return async function () { const leftId = event.logMessageData.leftParticipantFbId; // বট নিজে লিভ নিলে কিছু বলবে না if (leftId == api.getCurrentUserID()) return; const name = await usersData.getName(leftId); const selfLeft = event.author == leftId; const text = selfLeft ? `👋 Bye ${name}! আবার দেখা হবে।` : `👋 Bye ${name}! তোমাকে গ্রুপ থেকে সরানো হয়েছে।`; message.send({ body: text, mentions: [{ tag: name, id: leftId }] }); }; } };