const { get } = require("request-promise-native"); const { MessageEmbed } = require("discord.js") module.exports = { name: "pokemon", description: "Holen Sie sich eine beliebige Pokemon-Beschreibung", category: "info", usage: "pokemon ", run (client, message, args) { const options = { url: `https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/pokedex.php?pokemon=${args.join(" ")}`, json: true } message.channel.send(`Fetching Informtion for the Pokemon`).then(msg => { get(options).then(body => { let embed = new MessageEmbed() .setAuthor(body.name, `https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/${body.images.typeIcon}`) .setDescription(`Typ dieses Pokémon ist **${body.info.type}**. ${body.info.description}`) .setThumbnail(`https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/${body.images.photo}`) .setColor("RANDOM") .setFooter(`Schwäche von Pokémon- ${body.info.weakness}`, `https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/${body.images.weaknessIcon}`) message.channel.send(embed) msg.delete() }) }) } }