Upload case.js
Browse files
case.js
CHANGED
@@ -975,7 +975,9 @@ module.exports = async (conn, dev, chatUpdate, store) => {
|
|
975 |
> ββββββββββββββ
|
976 |
|
977 |
> βγ \`πππππππ ππππ\` γ
|
978 |
-
|
|
|
|
|
979 |
> ββββββββββββββ
|
980 |
|
981 |
> βγ \`πππππππ πππππ\` γ
|
@@ -3906,7 +3908,7 @@ case 'spotify': {
|
|
3906 |
image: {
|
3907 |
url: image
|
3908 |
},
|
3909 |
-
caption:
|
3910 |
}, {
|
3911 |
quoted: m
|
3912 |
});
|
@@ -3917,8 +3919,104 @@ case 'spotify': {
|
|
3917 |
}
|
3918 |
break;
|
3919 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3920 |
|
|
|
|
|
|
|
|
|
3921 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3922 |
|
3923 |
|
3924 |
|
|
|
975 |
> ββββββββββββββ
|
976 |
|
977 |
> βγ \`πππππππ ππππ\` γ
|
978 |
+
> ${sign} ${prefix}npmstalk
|
979 |
+
> ${sign} ${prefix}country
|
980 |
+
> ${sign} ${prefix}wachannel
|
981 |
> ββββββββββββββ
|
982 |
|
983 |
> βγ \`πππππππ πππππ\` γ
|
|
|
3908 |
image: {
|
3909 |
url: image
|
3910 |
},
|
3911 |
+
caption: fontx(`π¨ *Random Color*\n\nπΉ *Name*: ${name}\nπΉ *HEX*: #${hex}\n\n> ${caption}`),
|
3912 |
}, {
|
3913 |
quoted: m
|
3914 |
});
|
|
|
3919 |
}
|
3920 |
break;
|
3921 |
}
|
3922 |
+
case 'npmstalk': case 'npmstalk': {
|
3923 |
+
if (!q) return reply("β Please provide an NPM package name.\n\nExample: *!npmstalk express*");
|
3924 |
+
|
3925 |
+
await loading();
|
3926 |
+
let apiUrl = `https://api-xx-xi.hf.space/api/npmcheck?package=${encodeURIComponent(q)}`;
|
3927 |
+
|
3928 |
+
try {
|
3929 |
+
let response = await fetch(apiUrl);
|
3930 |
+
let json = await response.json();
|
3931 |
+
|
3932 |
+
if (!json.success) {
|
3933 |
+
return reply("β Package not found. Please check the package name and try again.");
|
3934 |
+
}
|
3935 |
+
|
3936 |
+
let npmInfo = fontx(`π¦ *NPM Package Info*\n\n`) +
|
3937 |
+
fontx(`π *Package:* ${json.package}\n`) +
|
3938 |
+
fontx(`π *Version:* ${json.version}\n`) +
|
3939 |
+
fontx(`π
*Published:* ${json.publishedDate}\n`) +
|
3940 |
+
fontx(`π *Version Count:* ${json.versionNumber}\n`) +
|
3941 |
+
fontx(`π *Dependents:* ${json.dependentsCount}\n`) +
|
3942 |
+
fontx(`π *Dependencies:* ${json.dependenciesCount}\n> ${caption}`);
|
3943 |
+
|
3944 |
+
conn.sendMessage(m.chat, {
|
3945 |
+
image: { url: json.codetypeimg },
|
3946 |
+
caption: npmInfo
|
3947 |
+
}, { quoted: m });
|
3948 |
+
|
3949 |
+
} catch (error) {
|
3950 |
+
console.error("Error fetching NPM package info:", error);
|
3951 |
+
reply("β An error occurred while retrieving the package details. Please try again later.");
|
3952 |
+
}
|
3953 |
+
break;
|
3954 |
+
}
|
3955 |
+
case 'wachannel': {
|
3956 |
+
if (!q) return reply("β Please provide a WhatsApp Channel link.\n\nExample: *!wachannel https://whatsapp.com/channel/0029Vah3fKtCnA7oMPTPJm1h*");
|
3957 |
+
|
3958 |
+
await loading();
|
3959 |
+
let apiUrl = `https://api-xx-xi.hf.space/api/wachannel?url=${encodeURIComponent(q)}`;
|
3960 |
+
|
3961 |
+
try {
|
3962 |
+
let response = await fetch(apiUrl);
|
3963 |
+
let json = await response.json();
|
3964 |
+
|
3965 |
+
if (!json.success) {
|
3966 |
+
return reply("β Channel not found. Please check the link and try again.");
|
3967 |
+
}
|
3968 |
+
|
3969 |
+
let channelInfo = fontx(`π’ *WhatsApp Channel Info*\n\n`) +
|
3970 |
+
fontx(`π *Name:* ${json.data.name}\n`) +
|
3971 |
+
fontx(`π₯ *Followers:* ${json.data.followers}\n`) +
|
3972 |
+
fontx(`π *Description:* ${json.data.description}\n> ${caption}`);
|
3973 |
|
3974 |
+
conn.sendMessage(m.chat, {
|
3975 |
+
image: { url: json.data.image },
|
3976 |
+
caption: channelInfo
|
3977 |
+
}, { quoted: m });
|
3978 |
|
3979 |
+
} catch (error) {
|
3980 |
+
console.error("Error fetching WhatsApp Channel info:", error);
|
3981 |
+
reply("β An error occurred while retrieving the channel details. Please try again later.");
|
3982 |
+
}
|
3983 |
+
break;
|
3984 |
+
}
|
3985 |
+
case 'country': {
|
3986 |
+
if (!q) return reply("β Please provide a country name.\n\nExample: *!country Nigeria*");
|
3987 |
+
|
3988 |
+
await loading();
|
3989 |
+
let apiUrl = `https://api-xx-xi.hf.space/api/country?q=${encodeURIComponent(q)}`;
|
3990 |
+
|
3991 |
+
try {
|
3992 |
+
let response = await fetch(apiUrl);
|
3993 |
+
let json = await response.json();
|
3994 |
+
|
3995 |
+
if (!json.success) {
|
3996 |
+
return reply("β Country not found. Please check the spelling and try again.");
|
3997 |
+
}
|
3998 |
+
|
3999 |
+
let countryInfo = fontx(`π *Country Information*\n\n`) +
|
4000 |
+
fontx(`π *Name:* ${json.data.name}\n`) +
|
4001 |
+
fontx(`ποΈ *Capital:* ${json.data.capital}\n`) +
|
4002 |
+
fontx(`π *Phone Code:* ${json.data.phoneCode}\n`) +
|
4003 |
+
fontx(`π° *Currency:* ${json.data.currency}\n`) +
|
4004 |
+
fontx(`π *Driving Side:* ${json.data.drivingSide}\n`) +
|
4005 |
+
fontx(`π *Internet TLD:* ${json.data.internetTLD}\n`) +
|
4006 |
+
fontx(`π *Location:* [Google Maps](${json.data.googleMapsLink})\n`) +
|
4007 |
+
fontx(`πΊοΈ *Continent:* ${json.data.continent.emoji} ${json.data.continent.name}`);
|
4008 |
+
|
4009 |
+
conn.sendMessage(m.chat, {
|
4010 |
+
image: { url: json.data.flag },
|
4011 |
+
caption: countryInfo
|
4012 |
+
}, { quoted: m });
|
4013 |
+
|
4014 |
+
} catch (error) {
|
4015 |
+
console.error("Error fetching country info:", error);
|
4016 |
+
reply("β An error occurred while retrieving country details. Please try again later.");
|
4017 |
+
}
|
4018 |
+
break;
|
4019 |
+
}
|
4020 |
|
4021 |
|
4022 |
|