Skip to content

Instantly share code, notes, and snippets.

@ONLym22
Created December 27, 2025 14:19
Show Gist options
  • Select an option

  • Save ONLym22/f76d3052edeab971f727ddf5f34e2495 to your computer and use it in GitHub Desktop.

Select an option

Save ONLym22/f76d3052edeab971f727ddf5f34e2495 to your computer and use it in GitHub Desktop.
ONLym BOT Gist Uploaded
case "animesearch":
case "searchanime":
case "otakusearch":
case "otakus": {
if (!text) return xreply("Contoh: .otakusearch one piece");
xreact();
try {
const query = encodeURIComponent(text);
const { data } = await axios.get(`https://onlym.my.id/anime/otakudesu/search?s=${query}&apikey=${global.onlym}`);
if (!data.status || !data.result || data.result.length === 0) {
return xreply("❌ Anime tidak ditemukan.");
}
const anime = data.result[0];
let caption = `πŸ” *Hasil Pencarian Anime*\n\n`;
caption += `🎬 *Judul:* ${anime.title}\n`;
caption += `🌟 *Rating:* ${anime.rating}\n`;
caption += `πŸ“Œ *Status:* ${anime.status}\n`;
caption += `🎭 *Genre:* ${anime.genres}\n`;
caption += `πŸ”— *Link:* ${anime.link}\n\n`;
caption += `Api : https://onlym.my.id/`;
await vellia.sendMessage(m.chat, {
image: { url: anime.imageUrl },
caption: caption,
contextInfo: {
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
newsletterName: `${wm}`,
newsletterJid: chjid + "@newsletter",
},
externalAdReply: {
title: anime.title,
body: `Status: ${anime.status}`,
thumbnailUrl: anime.imageUrl,
sourceUrl: anime.link,
mediaType: 1,
renderLargerThumbnail: false
}
}
}, { quoted: qkontak });
xreact("βœ…");
} catch (err) {
console.error(err);
xreact("❌");
xreply("❌ Terjadi kesalahan saat mencari anime.");
}
}
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment