It Returnes Top Trending Anime Data! Also This Snippet Uses My API
// Preview Image Link - https://media.discordapp.net/attachments/1019529578210918422/1023178212395712594/unknown.png?width=328&height=489
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let result = await lib.abhay557['anime-api']['@1.1.0'].trending();
console.log(result);
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: `Thanks To Abhay For API`,
description: '',
color: 0x41d43c,
author: {
name: `Top Trending Anime Query On Zoro.to`,
icon_url: `https://media.discordapp.net/attachments/928234875503398962/1011639174564163674/apple-touch-icon.png`,
},
fields: [
{
name: 'Name:',
value: `${result.results[0].name}`,
inline: true,
},
{
name: 'Trending Rank:',
value: `${result.results[0].number}`,
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()}`,
},
],
});