Skip to content

Commit

Permalink
[ Jessi-md V- 5.0.0☇ ]
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteshadowofficial authored Apr 23, 2024
1 parent 5fb3311 commit 6cc666a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions plugins/group-get-join-list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
let handler = async (m, { conn, usedPrefix, command }) => {
const response = await conn.groupRequestParticipantsList(m.chat);
if (!response || !response.length) {
conn.reply(m.chat, 'No pending join requests. ✅', m);
return;
}

let replyMessage = '😉 Join Request List:\n';
response.forEach((request, index) => {
const { jid, request_method, request_time } = request;
const formattedTime = new Date(parseInt(request_time) * 1000).toLocaleString();

replyMessage += `\n*No.: ${index + 1} Request Details. 👇*`;
replyMessage += `\n🧟‍♂️ *JID:* ${jid}`;
replyMessage += `\n🧪 *Method:* ${request_method}`;
replyMessage += `\n⏰ *Time:* ${formattedTime}\n`;
});

conn.reply(m.chat, replyMessage, m);
};

handler.help = ['getjoinreq'];
handler.tags = ['group', 'admins'];
handler.command = /^(getjoinreq)$/i;
handler.admin = true;
handler.group = true;
handler.botAdmin = true;

export default handler;

0 comments on commit 6cc666a

Please sign in to comment.