Upload case.js
Browse files
case.js
CHANGED
@@ -947,6 +947,8 @@ if (!fs.existsSync(chatMemoryFile)) {
|
|
947 |
> ${sign} ${prefix}block
|
948 |
> ${sign} ${prefix}unblock
|
949 |
> ${sign} ${prefix}setpp
|
|
|
|
|
950 |
> ${sign} ${prefix}setbio
|
951 |
> ${sign} ${prefix}restart
|
952 |
> ${sign} ${prefix}setname
|
@@ -1554,7 +1556,57 @@ case 'update': {
|
|
1554 |
reply(mess.success)
|
1555 |
}
|
1556 |
}
|
1557 |
-
break
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1558 |
case 'setbio':
|
1559 |
case 'setbotbio': {
|
1560 |
if (!isOwner) return reply(mess.only.owner);
|
@@ -5046,7 +5098,6 @@ if (isGroup) return;
|
|
5046 |
|
5047 |
|
5048 |
|
5049 |
-
|
5050 |
|
5051 |
|
5052 |
default:
|
|
|
947 |
> ${sign} ${prefix}block
|
948 |
> ${sign} ${prefix}unblock
|
949 |
> ${sign} ${prefix}setpp
|
950 |
+
> ${sign} ${prefix}delpp
|
951 |
+
> ${sign} ${prefix}getpp
|
952 |
> ${sign} ${prefix}setbio
|
953 |
> ${sign} ${prefix}restart
|
954 |
> ${sign} ${prefix}setname
|
|
|
1556 |
reply(mess.success)
|
1557 |
}
|
1558 |
}
|
1559 |
+
break;
|
1560 |
+
case 'delppbot': case 'delpp': {
|
1561 |
+
if (!isOwner) return reply(mess.only.owner);
|
1562 |
+
await loading();
|
1563 |
+
|
1564 |
+
try {
|
1565 |
+
await conn.query({
|
1566 |
+
tag: 'iq',
|
1567 |
+
attrs: {
|
1568 |
+
to: botNumber,
|
1569 |
+
type: 'set',
|
1570 |
+
xmlns: 'w:profile:picture'
|
1571 |
+
},
|
1572 |
+
content: [{
|
1573 |
+
tag: 'picture',
|
1574 |
+
attrs: {
|
1575 |
+
type: 'image'
|
1576 |
+
},
|
1577 |
+
content: null // Removing profile picture
|
1578 |
+
}]
|
1579 |
+
});
|
1580 |
+
|
1581 |
+
reply("✅ *Profile picture removed successfully!*");
|
1582 |
+
} catch (error) {
|
1583 |
+
console.error("Error deleting profile picture:", error);
|
1584 |
+
reply("❌ *Failed to delete profile picture. Try again later.*");
|
1585 |
+
}
|
1586 |
+
|
1587 |
+
break;
|
1588 |
+
}
|
1589 |
+
case 'fetchpp': case 'getpp': {
|
1590 |
+
if (!m.quoted) return reply("❌ Please reply to a user's message to fetch their profile picture.");
|
1591 |
+
|
1592 |
+
let user = m.quoted.sender;
|
1593 |
+
let profilePicUrl;
|
1594 |
+
|
1595 |
+
try {
|
1596 |
+
profilePicUrl = await conn.profilePictureUrl(user, 'image');
|
1597 |
+
} catch (err) {
|
1598 |
+
console.error("Error fetching profile picture:", err);
|
1599 |
+
profilePicUrl = "https://telegra.ph/file/3fa0c0cfdd2a631c3b310.jpg"; // Default no-profile image
|
1600 |
+
}
|
1601 |
+
|
1602 |
+
await conn.sendMessage(m.chat, {
|
1603 |
+
image: { url: profilePicUrl },
|
1604 |
+
caption: fontx(`🖼️ *Profile Picture Fetched!*\n👤 *User:* @${user.split("@")[0]}`),
|
1605 |
+
mentions: [user]
|
1606 |
+
}, { quoted: m });
|
1607 |
+
|
1608 |
+
break;
|
1609 |
+
}
|
1610 |
case 'setbio':
|
1611 |
case 'setbotbio': {
|
1612 |
if (!isOwner) return reply(mess.only.owner);
|
|
|
5098 |
|
5099 |
|
5100 |
|
|
|
5101 |
|
5102 |
|
5103 |
default:
|