|
const config = require('../config') |
|
const { cmd, commands } = require('../command') |
|
const { getBuffer, getGroupAdmins, getRandom, h2k, isUrl, Json, runtime, sleep, fetchJson} = require('../lib/functions') |
|
|
|
cmd({ |
|
pattern: "join", |
|
react: "π¬", |
|
alias: ["joinme","f_join"], |
|
desc: "To Join a Group from Invite link", |
|
category: "group", |
|
use: '.join < Group Link >', |
|
filename: __filename |
|
}, |
|
async(conn, mek, m,{from, l, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, groupAdmins, isBotAdmins, isCreator ,isDev, isAdmins, reply}) => { |
|
try{ |
|
const msr = (await fetchJson('https://raw.githubusercontent.com/JawadYTX/KHAN-DATA/refs/heads/main/MSG/mreply.json')).replyMsg |
|
|
|
if (!isCreator && !isDev && !isOwner && !isMe) return reply(msr.own_cmd) |
|
if (!q) return reply("*Please write the Group Link ποΈ*") |
|
let result = args[0].split('https://chat.whatsapp.com/')[1] |
|
await conn.groupAcceptInvite(result) |
|
await conn.sendMessage(from , { text: `*Successfully Joined β
*`}, { quoted: mek } ) |
|
} catch (e) { |
|
await conn.sendMessage(from, { react: { text: 'β', key: mek.key } }) |
|
console.log(e) |
|
reply(`β *Error Accurated !!*\n\n${e}`) |
|
} |
|
} ) |
|
|
|
cmd({ |
|
pattern: "tagadmins", |
|
react: "π", |
|
alias: ["admin" ,"admin","tagadmin"], |
|
desc: "To Tag all Admins of the Group", |
|
category: "group", |
|
use: '.tagadmins [message]', |
|
filename: __filename |
|
}, |
|
async (conn, mek, m, { from, participants, reply, isGroup, senderNumber, groupAdmins, prefix, command, args, body }) => { |
|
try { |
|
if (!isGroup) return reply("β This command can only be used in groups."); |
|
|
|
const botOwner = conn.user.id.split(":")[0]; |
|
const senderJid = senderNumber + "@s.whatsapp.net"; |
|
|
|
|
|
let groupInfo = await conn.groupMetadata(from).catch(() => null); |
|
if (!groupInfo) return reply("β Failed to fetch group information."); |
|
|
|
let groupName = groupInfo.subject || "Unknown Group"; |
|
let admins = await getGroupAdmins(participants); |
|
let totalAdmins = admins ? admins.length : 0; |
|
if (totalAdmins === 0) return reply("β No admins found in this group."); |
|
|
|
let emojis = ['β‘', 'β¨', 'ποΈ', 'π', 'π±', 'π', 'β€βπ©Ή', 'π»', 'π', 'πͺ', 'π', 'πͺΌ', 'πΏ', 'π', 'π', 'π¦', 'π', 'π»', 'πΈ', 'π₯', 'π', 'π§', 'π¨', 'π¦', 'π§', 'πͺ', 'πΎ', 'πͺ', 'π²', 'π‘', 'π§Έ', 'π', 'π', 'π©΅', 'β₯οΈ', 'π©' , 'π³οΈβπ', 'πͺ', 'π', 'π«', 'π', 'π', 'π', 'πͺ»', 'πͺΈ', 'π']; |
|
let randomEmoji = emojis[Math.floor(Math.random() * emojis.length)]; |
|
|
|
|
|
let message = body.slice(body.indexOf(command) + command.length).trim(); |
|
if (!message) message = "ATTENTION ADMINS"; |
|
|
|
let teks = `*β’ GROUP : ${groupName}*\n*β’ ADMINS : ${totalAdmins}*\n*β’ MESSAGE: ${message}*\n\nβ*βββββγ ADMINS MENTION γβ*\n`; |
|
|
|
for (let admin of admins) { |
|
if (!admin) continue; |
|
teks += `*β${randomEmoji} α©§πΌΰΎΰ½²* @${admin.split('@')[0]}\n`; |
|
} |
|
|
|
|
|
|
|
conn.sendMessage(from, { text: teks, mentions: admins }, { quoted: mek }); |
|
|
|
} catch (e) { |
|
console.error("TagAdmins Error:", e); |
|
reply(`β *Error Occurred !!*\n\n${e.message || e}`); |
|
} |
|
}); |
|
|
|
cmd({ |
|
pattern: "invite", |
|
react: "ποΈ", |
|
alias: ["grouplink","glink"], |
|
desc: "To Get the Group Invite link", |
|
category: "group", |
|
use: '.invite', |
|
filename: __filename |
|
}, |
|
async(conn, mek, m,{from, l, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, groupAdmins, isBotAdmins, isCreator ,isDev, isAdmins, reply}) => { |
|
try{ |
|
const msr = (await fetchJson('https://raw.githubusercontent.com/JawadYTX/KHAN-DATA/refs/heads/main/MSG/mreply.json')).replyMsg |
|
|
|
if (!isGroup) return reply(msr.only_gp) |
|
if (!isAdmins) { if (!isDev) return reply(msr.you_adm),{quoted:mek }} |
|
if (!isBotAdmins) return reply(msr.give_adm) |
|
const code = await conn.groupInviteCode(from) |
|
|
|
await conn.sendMessage(from , { text: `*ποΈ Group Link*\n\nhttps://chat.whatsapp.com/${code}`}, { quoted: mek } ) |
|
} catch (e) { |
|
await conn.sendMessage(from, { react: { text: 'β', key: mek.key } }) |
|
console.log(e) |
|
reply(`β *Error Accurated !!*\n\n${e}`) |
|
} |
|
} ) |
|
|
|
cmd({ |
|
pattern: "revoke", |
|
react: "ποΈ", |
|
alias: ["revokegrouplink","resetglink","revokelink","f_revoke"], |
|
desc: "To Reset the group link", |
|
category: "group", |
|
use: '.revoke', |
|
filename: __filename |
|
}, |
|
async(conn, mek, m,{from, l, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, groupAdmins, isBotAdmins, isCreator ,isDev, isAdmins, reply}) => { |
|
try{ |
|
const msr = (await fetchJson('https://raw.githubusercontent.com/JawadYTX/KHAN-DATA/refs/heads/main/MSG/mreply.json')).replyMsg |
|
|
|
if (!isGroup) return reply(msr.only_gp) |
|
if (!isAdmins) { if (!isDev) return reply(msr.you_adm),{quoted:mek }} |
|
if (!isBotAdmins) return reply(msr.give_adm) |
|
await conn.groupRevokeInvite(from) |
|
await conn.sendMessage(from , { text: `*Group link Reseted* β`}, { quoted: mek } ) |
|
} catch (e) { |
|
await conn.sendMessage(from, { react: { text: 'β', key: mek.key } }) |
|
console.log(e) |
|
reply(`β *Error Accurated !!*\n\n${e}`) |
|
} |
|
} ) |
|
|
|
cmd({ |
|
pattern: "promote", |
|
react: "π₯", |
|
alias: ["addadmin"], |
|
desc: "Promote a user to admin.", |
|
category: "group", |
|
filename: __filename |
|
}, async (conn, mek, m, { |
|
from, |
|
quoted, |
|
isGroup, |
|
isAdmins, |
|
isOwner, |
|
participants, |
|
isBotAdmins, |
|
reply |
|
}) => { |
|
try { |
|
if (!isGroup) return reply("β This command can only be used in groups."); |
|
if (!isAdmins && !isOwner) return reply("β Only group admins or the owner can use this command."); |
|
if (!isBotAdmins) return reply("β I need admin privileges to promote members."); |
|
|
|
|
|
let target; |
|
if (m.quoted) { |
|
target = m.quoted.sender; |
|
} else if (m.mentionedJid && m.mentionedJid.length > 0) { |
|
target = m.mentionedJid[0]; |
|
} else if (m.msg && m.msg.contextInfo && m.msg.contextInfo.mentionedJid && m.msg.contextInfo.mentionedJid.length > 0) { |
|
target = m.msg.contextInfo.mentionedJid[0]; |
|
} |
|
|
|
if (!target) return reply("β Please mention or reply to a user to promote."); |
|
|
|
|
|
const isAlreadyAdmin = participants.some(p => p.id === target && p.admin !== null); |
|
if (isAlreadyAdmin) return reply("β User is already an admin."); |
|
|
|
|
|
await conn.groupParticipantsUpdate(from, [target], "promote") |
|
.catch(err => { |
|
console.error(`β οΈ Failed to promote ${target}:`, err); |
|
return reply("β An error occurred while promoting the participant."); |
|
}); |
|
|
|
|
|
const tag = target.split('@')[0]; |
|
reply(`*_@${tag} Promoted Successfully_*`, { mentions: [target] }); |
|
|
|
} catch (error) { |
|
console.error('Error while executing promote:', error); |
|
reply('β An error occurred while executing the command.'); |
|
} |
|
}); |
|
|
|
cmd({ |
|
pattern: "demote", |
|
react: "π₯", |
|
alias: ["removeadmin"], |
|
desc: "Demote a user from admin.", |
|
category: "group", |
|
filename: __filename |
|
}, async (conn, mek, m, { |
|
from, |
|
quoted, |
|
isGroup, |
|
isAdmins, |
|
isOwner, |
|
participants, |
|
isBotAdmins, |
|
reply |
|
}) => { |
|
try { |
|
if (!isGroup) return reply("β This command can only be used in groups."); |
|
if (!isAdmins && !isOwner) return reply("β Only group admins or the owner can use this command."); |
|
if (!isBotAdmins) return reply("β I need admin privileges to demote members."); |
|
|
|
|
|
let target; |
|
if (m.quoted) { |
|
target = m.quoted.sender; |
|
} else if (m.mentionedJid && m.mentionedJid.length > 0) { |
|
target = m.mentionedJid[0]; |
|
} else if (m.msg && m.msg.contextInfo && m.msg.contextInfo.mentionedJid && m.msg.contextInfo.mentionedJid.length > 0) { |
|
target = m.msg.contextInfo.mentionedJid[0]; |
|
} |
|
|
|
if (!target) return reply("β Please mention or reply to a user to demote."); |
|
|
|
|
|
const isAdmin = participants.some(p => p.id === target && p.admin !== null); |
|
if (!isAdmin) return reply("β User is not an admin."); |
|
|
|
|
|
await conn.groupParticipantsUpdate(from, [target], "demote") |
|
.catch(err => { |
|
console.error(`β οΈ Failed to demote ${target}:`, err); |
|
return reply("β An error occurred while demoting the participant."); |
|
}); |
|
|
|
|
|
const tag = target.split('@')[0]; |
|
reply(`*_@${tag} Demoted Successfully_*`, { mentions: [target] }); |
|
|
|
} catch (error) { |
|
console.error('Error while executing demote:', error); |
|
reply('β An error occurred while executing the command.'); |
|
} |
|
}); |
|
|
|
|
|
cmd({ |
|
pattern: "taggp", |
|
react: "π", |
|
alias: ["tggp","djtaggp"], |
|
desc: "To Tag all Members for Message", |
|
category: "group", |
|
use: '.tag Hi', |
|
filename: __filename |
|
}, |
|
async(conn, mek, m,{from, l, quoted, body, isCmd, command, mentionByTag , args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, groupAdmins, isBotAdmins, isCreator ,isDev, isAdmins, reply}) => { |
|
try{ |
|
if ( !m.quoted ) return reply('*Please mention a message* βΉοΈ') |
|
if(!q) return reply('*Please add a Group Jid* βΉοΈ') |
|
|
|
let teks = `${m.quoted.msg}` |
|
conn.sendMessage(q, { text: teks, mentions: participants.map(a => a.id) }, { quoted: mek }) |
|
|
|
} catch (e) { |
|
await conn.sendMessage(from, { react: { text: 'β', key: mek.key } }) |
|
console.log(e) |
|
reply(`β *Error Accurated !!*\n\n${e}`) |
|
} |
|
} ) |
|
|
|
cmd({ |
|
pattern: "gginfo", |
|
desc: "Get group information.", |
|
category: "group", |
|
filename: __filename, |
|
}, async (conn, mek, m, { |
|
from, |
|
isGroup, |
|
isAdmins, |
|
isOwner, |
|
isBotAdmins, |
|
reply |
|
}) => { |
|
try { |
|
|
|
if (!isGroup) return reply("*`[β]`This command can only be used in groups.*"); |
|
|
|
|
|
if (!isAdmins && !isOwner) return reply("*`[β]`Only admins and the owner can use this command.*"); |
|
|
|
|
|
if (!isBotAdmins) return reply("*`[β]`I need admin privileges to execute this command.*"); |
|
|
|
|
|
const groupMetadata = await conn.groupMetadata(from); |
|
const groupName = groupMetadata.subject; |
|
const memberCount = groupMetadata.participants.length; |
|
|
|
|
|
let creator = groupMetadata.owner ? `@${groupMetadata.owner.split('@')[0]}` : 'Unknown'; |
|
|
|
|
|
const groupAdmins = groupMetadata.participants |
|
.filter(member => member.admin) |
|
.map((admin, index) => `${index + 1}. @${admin.id.split('@')[0]}`) |
|
.join("\n") || "No admins found"; |
|
|
|
|
|
const creationDate = groupMetadata.creation |
|
? new Date(groupMetadata.creation * 1000).toLocaleString('en-US', { |
|
weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit' |
|
}) |
|
: 'Unknown'; |
|
|
|
|
|
const message = ` |
|
βββββγ *GROUP INFO* γβββββ |
|
β π·οΈ *Ι’Κα΄α΄α΄ Ι΄α΄α΄α΄:* ${groupName} |
|
β π *Ι’Κα΄α΄α΄ Ιͺα΄
:* ${from} |
|
β π₯ *α΄α΄α΄α΄Κ α΄α΄α΄Κα΄Κs:* ${memberCount} |
|
β π¨π»βπ» *α΄Κα΄α΄α΄α΄Κ:* ${creator} |
|
β π
*α΄Κα΄α΄α΄α΄α΄
α΄Ι΄:* ${creationDate} |
|
β π *α΄α΄
α΄ΙͺΙ΄s:* |
|
β ${groupAdmins} |
|
β°βββββββββββββββββββββ`; |
|
|
|
|
|
await conn.sendMessage(from, { |
|
text: message, |
|
mentions: groupMetadata.participants |
|
.filter(member => member.admin) |
|
.map(admin => admin.id) |
|
}, { quoted: mek }); |
|
|
|
} catch (error) { |
|
console.error("Error in ginfo command:", error); |
|
reply("β An error occurred while retrieving the group information."); |
|
} |
|
}); |
|
|
|
cmd({ |
|
pattern: "tagall", |
|
react: "π", |
|
alias: ["gc_tagall"], |
|
desc: "To Tag all Members", |
|
category: "group", |
|
use: '.tagall [message]', |
|
filename: __filename |
|
}, |
|
async (conn, mek, m, { from, participants, reply, isGroup, senderNumber, groupAdmins, prefix, command, args, body }) => { |
|
try { |
|
if (!isGroup) return reply("*π α΄ΚΙͺs α΄α΄α΄α΄α΄Ι΄α΄
α΄α΄Ι΄ α΄Ι΄ΚΚ Κα΄ α΄sα΄α΄
ΙͺΙ΄ Ι’Κα΄α΄α΄s.*"); |
|
|
|
const botOwner = conn.user.id.split(":")[0]; |
|
const senderJid = senderNumber + "@s.whatsapp.net"; |
|
|
|
if (!groupAdmins.includes(senderJid) && senderNumber !== botOwner) { |
|
return reply("*π ΟΙ΄βΚ gΚΟα΄α΄ Ξ±βΠΌΞΉΙ΄s ΟΚ ΡΠ½Ρ ΟΟΙ΄ΡΚ α΄Ξ±Ι΄ α΄sΡ ΡΠ½ΞΉΡ α΄ΟΠΌΠΌΞ±Ι΄β.*"); |
|
} |
|
|
|
|
|
let groupInfo = await conn.groupMetadata(from).catch(() => null); |
|
if (!groupInfo) return reply("β Failed to fetch group information."); |
|
|
|
let groupName = groupInfo.subject || "Unknown Group"; |
|
let totalMembers = participants ? participants.length : 0; |
|
if (totalMembers === 0) return reply("β No members found in this group."); |
|
|
|
let emojis = ['β‘', 'β¨', 'ποΈ', 'π', 'π±', 'π', 'β€βπ©Ή', 'π»', 'π', 'πͺ', 'π', 'πͺΌ', 'πΏ', 'π', 'π', 'π¦', 'π', 'π»', 'πΈ', 'π₯', 'π', 'π§', 'π¨', 'π¦', 'π§', 'πͺ', 'πΎ', 'πͺ', 'π²', 'π‘', 'π§Έ', 'π', 'π', 'π©΅', 'β₯οΈ', 'π©' , 'π³οΈβπ', 'πͺ', 'π', 'π«', 'π', 'π', 'π', 'πͺ»', 'πͺΈ', 'π']; |
|
let randomEmoji = emojis[Math.floor(Math.random() * emojis.length)]; |
|
|
|
|
|
let message = body.slice(body.indexOf(command) + command.length).trim(); |
|
if (!message) message = "ATTENTION EVERYONE"; |
|
|
|
let teks = `*β’ GROUP : ${groupName}*\n*β’ MEMBERS : ${totalMembers}*\n*β’ MESSAGE : ${message}*\n\n*βββγ \`π©α―αͺ³ππππππππαΎαͺ³πͺ\` γββ*\n`; |
|
|
|
for (let mem of participants) { |
|
if (!mem.id) continue; |
|
teks += `*β${randomEmoji} α©§πΌΰΎΰ½²* @${mem.id.split('@')[0]}\n`; |
|
} |
|
|
|
conn.sendMessage(from, { text: teks, mentions: participants.map(a => a.id) }, { quoted: mek }); |
|
|
|
} catch (e) { |
|
console.error("TagAll Error:", e); |
|
reply(`β *Error Occurred !!*\n\n${e.message || e}`); |
|
} |
|
}); |
|
|
|
cmd({ |
|
pattern: "add", |
|
alias: ["aja"], |
|
react: "β", |
|
desc: "Adds a user to the group.", |
|
category: "group", |
|
filename: __filename, |
|
use: '<number>', |
|
}, |
|
async (conn, mek, m, { from, args, q, isGroup, senderNumber, botNumber, reply }) => { |
|
try { |
|
if (!isGroup) return reply("*π This command can only be used in groups.*"); |
|
|
|
|
|
const botOwner = conn.user.id.split(":")[0]; |
|
|
|
|
|
if (senderNumber !== botOwner) { |
|
return reply("*π Only the bot owner can use this command.*"); |
|
} |
|
|
|
|
|
if (!isBotAdmins) return reply("*π I need to be an admin to add users.*"); |
|
|
|
|
|
if (!q || isNaN(q)) return reply("*π Please provide a valid phone number to add.*"); |
|
|
|
const userToAdd = `${q}@s.whatsapp.net`; |
|
|
|
|
|
let response = await conn.groupParticipantsUpdate(from, [userToAdd], "add"); |
|
|
|
|
|
if (response[0].status === 200) { |
|
reply(`β
User *${q}* has been added to the group.`); |
|
} else { |
|
reply("β Failed to add user. Make sure the number is correct and they are not already in the group."); |
|
} |
|
} catch (e) { |
|
console.error("Error adding user:", e); |
|
reply("β An error occurred while adding the user. Please try again."); |
|
} |
|
}); |
|
|
|
cmd({ |
|
pattern: "updategdesc", |
|
alias: ["upgdesc", "gdesc"], |
|
react: "π", |
|
desc: "Change the group description.", |
|
category: "group", |
|
filename: __filename |
|
}, |
|
async (conn, mek, m, { from, isGroup, isAdmins, isBotAdmins, args, q, reply }) => { |
|
try { |
|
if (!isGroup) return reply("*π This command can only be used in groups.*"); |
|
if (!isAdmins) return reply("*β Only group admins can use this command.*"); |
|
if (!isBotAdmins) return reply("β I need to be an admin to update the group description."); |
|
if (!q) return reply("*β Please provide a new group description.*"); |
|
|
|
await conn.groupUpdateDescription(from, q); |
|
reply("*β
Group description has been updated.*"); |
|
} catch (e) { |
|
console.error("Error updating group description:", e); |
|
reply("β Failed to update the group description. Please try again."); |
|
} |
|
}); |
|
|
|
cmd({ |
|
pattern: "updategname", |
|
alias: ["upgname", "gname"], |
|
react: "π", |
|
desc: "Change the group name.", |
|
category: "group", |
|
filename: __filename |
|
}, |
|
async (conn, mek, m, { from, isGroup, isAdmins, isBotAdmins, args, q, reply }) => { |
|
try { |
|
if (!isGroup) return reply("*π This command can only be used in groups.*"); |
|
if (!isAdmins) return reply("β Only group admins can use this command."); |
|
if (!isBotAdmins) return reply("*π I need to be an admin to update the group name.*"); |
|
if (!q) return reply("*βοΈ Please provide a new group name.*"); |
|
|
|
await conn.groupUpdateSubject(from, q); |
|
reply(`β
Group name has been updated to: *${q}*`); |
|
} catch (e) { |
|
console.error("Error updating group name:", e); |
|
reply("β Failed to update the group name. Please try again."); |
|
} |
|
}); |
|
|
|
|
|
cmd({ |
|
pattern: "lockgc", |
|
alias: ["lock"], |
|
react: "π", |
|
desc: "Lock the group (Prevents new members from joining).", |
|
category: "group", |
|
filename: __filename |
|
}, |
|
async (conn, mek, m, { from, isGroup, isAdmins, isBotAdmins, reply }) => { |
|
try { |
|
if (!isGroup) return reply("β This command can only be used in groups."); |
|
if (!isAdmins) return reply("*π Only group admins can use this command.*"); |
|
if (!isBotAdmins) return reply("*π I need to be an admin to lock the group.*"); |
|
|
|
await conn.groupSettingUpdate(from, "locked"); |
|
reply("*β
Group has been locked. New members cannot join.*"); |
|
} catch (e) { |
|
console.error("Error locking group:", e); |
|
reply("β Failed to lock the group. Please try again."); |
|
} |
|
}); |
|
|
|
cmd({ |
|
pattern: "mute", |
|
alias: ["groupmute"], |
|
react: "π", |
|
desc: "Mute the group (Only admins can send messages).", |
|
category: "group", |
|
filename: __filename |
|
}, |
|
async (conn, mek, m, { from, isGroup, senderNumber, isAdmins, isBotAdmins, reply }) => { |
|
try { |
|
if (!isGroup) return reply("β This command can only be used in groups."); |
|
if (!isAdmins) return reply("*π α΄Ι΄ΚΚ Ι’Κα΄α΄α΄ α΄α΄
α΄ΙͺΙ΄s α΄α΄Ι΄ α΄sα΄ α΄ΚΙͺs α΄α΄α΄α΄α΄Ι΄α΄
.*"); |
|
if (!isBotAdmins) return reply("*π Ι΄α΄α΄α΄
α΄α΄ Κα΄ α΄Ι΄ α΄α΄
α΄ΙͺΙ΄ α΄α΄ α΄Ι΄α΄α΄α΄α΄ α΄Κα΄ Ι’Κα΄α΄α΄*"); |
|
|
|
await conn.groupSettingUpdate(from, "announcement"); |
|
reply("*gΚΟα΄Ο ΠΌα΄ΡΡβ sα΄α΄α΄ΡΡΡfα΄ββΡπ*"); |
|
} catch (e) { |
|
console.error("Error muting group:", e); |
|
reply("β Failed to mute the group. Please try again."); |
|
} |
|
}); |
|
|
|
cmd({ |
|
pattern: "unmute", |
|
alias: ["groupunmute"], |
|
react: "π", |
|
desc: "Unmute the group (Everyone can send messages).", |
|
category: "group", |
|
filename: __filename |
|
}, |
|
async (conn, mek, m, { from, isGroup, senderNumber, isAdmins, isBotAdmins, reply }) => { |
|
try { |
|
if (!isGroup) return reply("β This command can only be used in groups."); |
|
if (!isAdmins) return reply("*π α΄Ι΄ΚΚ Ι’Κα΄α΄α΄ α΄α΄
α΄ΙͺΙ΄s α΄α΄Ι΄ α΄sα΄ α΄ΚΙͺs α΄α΄α΄α΄α΄Ι΄α΄
.*"); |
|
if (!isBotAdmins) return reply("*π Ι΄α΄α΄α΄
α΄α΄ Κα΄ α΄Ι΄ α΄α΄
α΄ΙͺΙ΄ α΄α΄ α΄Ι΄α΄α΄α΄α΄ α΄Κα΄ Ι’Κα΄α΄α΄*"); |
|
|
|
await conn.groupSettingUpdate(from, "not_announcement"); |
|
reply("*gΚΟα΄Ο α΄Ι΄ΠΌΟ
ΡΡβ sα΄α΄α΄ΡΡΡfα΄ββΡπ*"); |
|
} catch (e) { |
|
console.error("Error unmuting group:", e); |
|
reply("β Failed to unmute the group. Please try again."); |
|
} |
|
}); |
|
|
|
cmd({ |
|
pattern: "unlockgc", |
|
alias: ["unlock"], |
|
react: "π", |
|
desc: "Unlock the group (Allows new members to join).", |
|
category: "group", |
|
filename: __filename |
|
}, |
|
async (conn, mek, m, { from, isGroup, isAdmins, isBotAdmins, reply }) => { |
|
try { |
|
if (!isGroup) return reply("β This command can only be used in groups."); |
|
if (!isAdmins) return reply("*π Only group admins can use this command.*"); |
|
if (!isBotAdmins) return reply("*π I need to be an admin to unlock the group.*"); |
|
|
|
await conn.groupSettingUpdate(from, "unlocked"); |
|
reply("β
Group has been unlocked. New members can now join."); |
|
} catch (e) { |
|
console.error("Error unlocking group:", e); |
|
reply("β Failed to unlock the group. Please try again."); |
|
} |
|
}); |
|
|