Upload case.js
Browse files
case.js
CHANGED
@@ -991,6 +991,9 @@ module.exports = async (conn, dev, chatUpdate, store) => {
|
|
991 |
|
992 |
> βγ \`ππ ππππ\` γ
|
993 |
> ${sign} tts
|
|
|
|
|
|
|
994 |
> ${sign} text2img
|
995 |
> ββββββββββββββ
|
996 |
|
@@ -1618,9 +1621,97 @@ case 'tinyurl': {
|
|
1618 |
}
|
1619 |
break;
|
1620 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1621 |
|
|
|
1622 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1623 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1624 |
|
1625 |
|
1626 |
|
|
|
991 |
|
992 |
> βγ \`ππ ππππ\` γ
|
993 |
> ${sign} tts
|
994 |
+
> ${sign} blueai
|
995 |
+
> ${sign} gemini
|
996 |
+
> ${sign} gemini-pro
|
997 |
> ${sign} text2img
|
998 |
> ββββββββββββββ
|
999 |
|
|
|
1621 |
}
|
1622 |
break;
|
1623 |
}
|
1624 |
+
case 'blueai': {
|
1625 |
+
if (!q) {
|
1626 |
+
return reply(`*Please provide a query.*\n\n*Example:* ${prefix + command} Hello, which model are you?`);
|
1627 |
+
}
|
1628 |
+
|
1629 |
+
await loading();
|
1630 |
+
|
1631 |
+
try {
|
1632 |
+
const prompt = "your model is based on gpt 5 mini trained by blue demon, Your purpose is to assist users with a wide range of tasks and queries effectively without too much talk,from now on u are Branded by this. Question: ";
|
1633 |
+
|
1634 |
+
const apiUrl = `https://api-lenwy.vercel.app/ai4chat?text=${encodeURIComponent(prompt)}${encodeURIComponent(q)}`;
|
1635 |
+
const response = await fetch(apiUrl);
|
1636 |
+
const res = await response.json();
|
1637 |
+
if (res.status !== 200 || !res.data) {
|
1638 |
+
return reply("Failed to process your request. Please try again later.");
|
1639 |
+
}
|
1640 |
+
const aiResponse = res.data;
|
1641 |
+
await conn.sendMessage(from, {
|
1642 |
+
image: {
|
1643 |
+
url: './temp/blueimages/thumb.jpg', },
|
1644 |
+
caption: fontx(`*BLUE AI Response:*\n${aiResponse}\n> ${caption}`),
|
1645 |
+
}, {
|
1646 |
+
quoted: m
|
1647 |
+
});
|
1648 |
+
|
1649 |
+
} catch (error) {
|
1650 |
+
console.error("Error in BLUE Ai case:", error);
|
1651 |
+
reply("An error occurred while processing your request. Please try again later.");
|
1652 |
+
}
|
1653 |
+
|
1654 |
+
break;
|
1655 |
+
}
|
1656 |
+
case 'gemini': {
|
1657 |
+
if (!q) return reply(`*Please provide a query.*\n\n*Example:* ${prefix + command} Hello, which model are you?`);
|
1658 |
+
|
1659 |
+
await loading();
|
1660 |
+
|
1661 |
+
try {
|
1662 |
+
const apiUrl = `https://api-lenwy.vercel.app/ai4chat?text=${encodeURIComponent(q)}`;
|
1663 |
+
const response = await fetch(apiUrl);
|
1664 |
+
const res = await response.json();
|
1665 |
+
if (res.status !== 200 || !res.data) {
|
1666 |
+
return reply("Failed to process your request. Please try again later.");
|
1667 |
+
}
|
1668 |
+
const aiResponse = res.data;
|
1669 |
+
await conn.sendMessage(from, {
|
1670 |
+
image: {
|
1671 |
+
url: './temp/blueimages/gemini.jpg'
|
1672 |
+
},
|
1673 |
+
caption: fontx(`*Gemini AI Response:*\n\n${aiResponse}\n> ${caption}`),
|
1674 |
+
}, {
|
1675 |
+
quoted: m
|
1676 |
+
});
|
1677 |
+
} catch (error) {
|
1678 |
+
console.error("Error in Gemini case:", error);
|
1679 |
+
reply("An error occurred while processing your request. Please try again later.");
|
1680 |
+
}
|
1681 |
+
break;
|
1682 |
+
}
|
1683 |
+
case 'gemini-pro':
|
1684 |
+
case 'ai': {
|
1685 |
+
if (!q) {
|
1686 |
+
return reply(`*Please provide a query.*\n\n*Example:* ${prefix + command} Hello, what model are you?`);
|
1687 |
+
}
|
1688 |
|
1689 |
+
await loading();
|
1690 |
|
1691 |
+
try {
|
1692 |
+
const apiUrl = `https://bk9.fun/ai/gemini?q=${encodeURIComponent(q)}`;
|
1693 |
+
const response = await fetch(apiUrl);
|
1694 |
+
const res = await response.json();
|
1695 |
+
if (!res.status || !res.BK9) {
|
1696 |
+
return reply("Failed to process your request. Please try again later.");
|
1697 |
+
}
|
1698 |
+
|
1699 |
+
const aiResponse = res.BK9;
|
1700 |
|
1701 |
+
await conn.sendMessage(from, {
|
1702 |
+
image: {
|
1703 |
+
url: './temp/blueimages/geminipro.jpg'
|
1704 |
+
},
|
1705 |
+
caption: fontx(`*Gemini pro Response:*\n${aiResponse}\n> ${caption}`),
|
1706 |
+
}, {
|
1707 |
+
quoted: m
|
1708 |
+
});
|
1709 |
+
} catch (error) {
|
1710 |
+
console.error("Error in Gemini-pro case:", error);
|
1711 |
+
reply("An error occurred while processing your request. Please try again later.");
|
1712 |
+
}
|
1713 |
+
break;
|
1714 |
+
}
|
1715 |
|
1716 |
|
1717 |
|