mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 15:07:26 +02:00
50 lines
2.6 KiB
JavaScript
50 lines
2.6 KiB
JavaScript
const Discord = require("discord.js");
|
|
const malScraper = require('mal-scraper');
|
|
|
|
module.exports = {
|
|
name: "anime",
|
|
description: "Obtenez des informations sur un anime!",
|
|
emote: '🎬',
|
|
category: 'utils',
|
|
utilisation: 'anime <anime_name>',
|
|
async execute(message, args, client) {
|
|
|
|
const search = `${args}`;
|
|
if (!search)
|
|
return message.reply(':x: | Veuillez ajouter une requête de recherche.');
|
|
|
|
malScraper.getInfoFromName(search)
|
|
.then((data) => {
|
|
const malEmbed = new Discord.EmbedBuilder()
|
|
.setAuthor( {name: `Résultat de recherce pour ${args}`.split(',').join(' ')})
|
|
.setImage(data.picture)
|
|
.addFields(
|
|
{ name: '📆 Première', value: `\`${data.premiered}\``, inline: true },
|
|
{ name: '📺 Diffuser', value: `\`${data.broadcast}\``, inline: true },
|
|
{ name: '🎭 Genres', value: `\`${data.genres}\``, inline: true },
|
|
{ name: '🇬🇧 Titre anglais', value: `\`${data.englishTitle}\``, inline: true },
|
|
{ name: '🇯🇵 Titre japonais', value: `\`${data.japaneseTitle}\``, inline: true },
|
|
{ name: '🎬 Type', value: `\`${data.type}\``, inline: true },
|
|
{ name: '📚 Episodes', value: `\`${data.episodes}\``, inline: true },
|
|
{ name: '🌟 Evaluation', value: `\`${data.rating}\``, inline: true },
|
|
{ name: '📡 Diffusé', value: `\`${data.aired}\``, inline: true },
|
|
{ name: '💯 Score', value: `\`${data.score}\``, inline: true },
|
|
{ name: '👍 Favori', value: `\`${data.favorites}\``, inline: true },
|
|
{ name: '📊 Classé', value: `\`${data.ranked}\``, inline: true },
|
|
{ name: '⌛ Durée', value: `\`${data.duration}\``, inline: true },
|
|
{ name: '🎥 Studios', value: `\`${data.studios}\``, inline: true },
|
|
{ name: '📈 Popularité', value: `\`${data.popularity}\``, inline: true },
|
|
{ name: '👥 Membres', value: `\`${data.members}\``, inline: true },
|
|
{ name: '📊 Score Stats', value: `\`${data.scoreStats}\``, inline: true },
|
|
{ name: '🔍 Source', value: `\`${data.source}\``, inline: true },
|
|
{ name: '🔄 Synonymes', value: `\`${data.synonyms}\``, inline: true },
|
|
{ name: '🔁 Status', value: `\`${data.status}\``, inline: true },
|
|
{ name: '🆔 Identifier', value: `\`${data.id}\``, inline: true },
|
|
{ name: '🔗 Link', value: `\`${data.url}\``, inline: true }
|
|
)
|
|
|
|
message.channel.send({embeds: [malEmbed]});
|
|
|
|
})
|
|
}
|
|
}; |