This Snippet Allows You Search Anime On Zoro.to Anime Watching Platform Its Advanced Because Its Returns Anime Data Even Also Link & Posters!
// Want To See Preview? Open This URL - https://media.discordapp.net/attachments/1019529578210918422/1022449580090085476/unknown.png?width=412&height=605
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let search = context.params.event.content.split(' ').slice(1).join(' ');
console.log(search);
let result = await lib.abhay557['anime-api']['@1.1.4'].search({search});
console.log(result);
if (result.amount == null) {
return lib.discord.channels['@0.3.2'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `Invalid: ||${search}|| No Anime Found!`,
});
}
await lib.discord.channels['@0.1.2'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
components: [
{
type: 1,
components: [
{
style: 5,
label: `Link`,
url: `${result.results[0].link}`,
disabled: false,
type: 2,
},
],
},
],
embeds: [
{
type: 'rich',
title: `You Searched For: ||${search}||`,
description: '',
color: 0x41d43c,
author: {
name: `Anime Search Query On Zoro.to`,
icon_url: `https://media.discordapp.net/attachments/928234875503398962/1011639174564163674/apple-touch-icon.png`,
},
fields: [
{
name: 'Name:',
value: `${result.results[0].title}`,
inline: true,
},
{
name: `Episodes:`,
value: `${result.results[0].episodes}`,
inline: true,
},
{
name: 'Time:',
value: `${result.results[0].duration}`,
inline: true,
},
{
name: 'Languages:',
value: `${result.results[0].languages}`,
inline: true,
},
],
image: {
url: `${result.results[0].poster}`,
height: 0,
width: 0,
},
footer: {
text: `Asked By ${context.params.event.author.username}#${context.params.event.author.discriminator}`,
},
timestamp: `${new Date().toISOString()}`,
},
],
});