Upload case.js
Browse files
case.js
CHANGED
@@ -994,10 +994,10 @@ module.exports = async (conn, dev, chatUpdate, store) => {
|
|
994 |
> ββββββββββββββ
|
995 |
|
996 |
> βγ \`πππππ πππππππππ\` γ
|
997 |
-
> ${sign} ${prefix}play
|
998 |
-
> ${sign} ${prefix}video
|
999 |
> ${sign} ${prefix}animedl
|
1000 |
-
|
1001 |
|
1002 |
> ββββββββββββββ
|
1003 |
|
@@ -1056,7 +1056,7 @@ module.exports = async (conn, dev, chatUpdate, store) => {
|
|
1056 |
> ββββββββββββββ
|
1057 |
|
1058 |
> βγ \`πππ
π ππππ\` γ
|
1059 |
-
|
1060 |
> ββββββββββββββ
|
1061 |
|
1062 |
> βγ \`ππππππ ππππ\` γ
|
@@ -3000,8 +3000,89 @@ case 'play':
|
|
3000 |
|
3001 |
break;
|
3002 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3003 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3004 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3005 |
|
3006 |
|
3007 |
|
|
|
994 |
> ββββββββββββββ
|
995 |
|
996 |
> βγ \`πππππ πππππππππ\` γ
|
997 |
+
> ${sign} ${prefix}play x
|
998 |
+
> ${sign} ${prefix}video x
|
999 |
> ${sign} ${prefix}animedl
|
1000 |
+
> ${sign} ${prefix}yts
|
1001 |
|
1002 |
> ββββββββββββββ
|
1003 |
|
|
|
1056 |
> ββββββββββββββ
|
1057 |
|
1058 |
> βγ \`πππ
π ππππ\` γ
|
1059 |
+
> ${sign} ${prefix}waifu
|
1060 |
> ββββββββββββββ
|
1061 |
|
1062 |
> βγ \`ππππππ ππππ\` γ
|
|
|
3000 |
|
3001 |
break;
|
3002 |
}
|
3003 |
+
case 'yts': {
|
3004 |
+
if (!q) return reply("Please provide a search query.");
|
3005 |
+
await loading()
|
3006 |
+
|
3007 |
+
try {
|
3008 |
+
const searchResults = await yts(q);
|
3009 |
+
const videoResults = searchResults.all.filter((v) => v.type === 'video');
|
3010 |
+
if (!videoResults || videoResults.length === 0) return reply("No videos found.");
|
3011 |
+
|
3012 |
+
const videoID = videoResults[0].videoId;
|
3013 |
+
const thumbnail = `https://i.ytimg.com/vi/${videoID}/mqdefault.jpg`;
|
3014 |
+
|
3015 |
+
let responseMessage = `π *YouTube Search Results:*\n`;
|
3016 |
+
for (let video of videoResults) {
|
3017 |
+
responseMessage += `
|
3018 |
+
π *Title:* ${video.title}
|
3019 |
+
π *Views:* ${video.views}
|
3020 |
+
π
*Uploaded:* ${video.ago}
|
3021 |
+
β±οΈ *Duration:* ${video.timestamp}
|
3022 |
+
π₯ *Channel:* ${video.author.name}
|
3023 |
+
π *Link:* ${video.url}\n\n`;
|
3024 |
+
}
|
3025 |
+
await conn.sendMessage(
|
3026 |
+
from, {
|
3027 |
+
caption: responseMessage.trim(),
|
3028 |
+
image: {
|
3029 |
+
url: thumbnail
|
3030 |
+
},
|
3031 |
+
}, {
|
3032 |
+
quoted: dev
|
3033 |
+
}
|
3034 |
+
);
|
3035 |
+
} catch (error) {
|
3036 |
+
console.error(error);
|
3037 |
+
reply("An error occurred while fetching the YouTube search results.");
|
3038 |
+
}
|
3039 |
+
break;
|
3040 |
+
}
|
3041 |
+
case 'nsfw': {
|
3042 |
+
if (!isGroup) return reply(mess.only.group)
|
3043 |
+
if (!isGroupAdmins && !isOwner) return reply(mess.only.admin)
|
3044 |
+
if (args.length < 1) return reply('*Enable or disable? Use: α΄Ι΄/α΄κ°κ°*')
|
3045 |
+
if (args[0] === 'on') {
|
3046 |
+
db.data.chats[from].nsfw = true
|
3047 |
+
reply(`*\`${command} has been enabled in this group\`*`)
|
3048 |
+
let warning = fontx(`
|
3049 |
+
*γ β οΈ πππππππ β οΈ γ*\nThe NSFW (Not Safe For Work) feature has been activated in this group. As a result, explicit content may be accessible through the bot. Please proceed with caution and ensure compliance with community guidelines.
|
3050 |
+
`)
|
3051 |
+
m.reply(warning)
|
3052 |
+
} else if (args[0] === 'off') {
|
3053 |
+
db.data.chats[from].nsfw = false
|
3054 |
+
reply(`*\`${command} has been disabled in this group\`*`)
|
3055 |
+
}
|
3056 |
+
}
|
3057 |
+
break
|
3058 |
+
case 'waifu': {
|
3059 |
+
if (!isGroup) return reply(mess.only.group)
|
3060 |
+
if (!isAntiNsfw) return reply(mess.nsfw)
|
3061 |
+
await loading();
|
3062 |
+
let query = q ? encodeURIComponent(q) : 'pussy';
|
3063 |
+
let apiUrl = `https://api-xx-xi.hf.space/api/waifu?q=${query}`;
|
3064 |
|
3065 |
+
try {
|
3066 |
+
let response = await fetch(apiUrl);
|
3067 |
+
let json = await response.json();
|
3068 |
+
|
3069 |
+
if (!json.success || !json.images.length) {
|
3070 |
+
return conn.sendMessage(m.chat, { text: fontx(`β No waifu images found for *${query}*. Try another category!`) });
|
3071 |
+
}
|
3072 |
+
|
3073 |
+
let randomImage = json.images[Math.floor(Math.random() * json.images.length)];
|
3074 |
|
3075 |
+
await conn.sendMessage(m.chat, {
|
3076 |
+
image: { url: randomImage },
|
3077 |
+
caption: fontx(`πΌοΈ *Waifu Image*\nπ *Category:* ${json.category}\n> ${caption}`)
|
3078 |
+
});
|
3079 |
+
|
3080 |
+
} catch (error) {
|
3081 |
+
console.error("Error fetching waifu image:", error);
|
3082 |
+
conn.sendMessage(m.chat, { text: fontx("β An error occurred while fetching the waifu image.") });
|
3083 |
+
}
|
3084 |
+
break;
|
3085 |
+
}
|
3086 |
|
3087 |
|
3088 |
|