Archived
Dateien nach "commands/info-search" hochladen
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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 <name>",
|
||||
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(`<a:Exe_Nitro3:743845033475702794>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()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user