Dateien nach "commands/info-search" hochladen

This commit is contained in:
2024-02-07 14:46:45 +00:00
parent cd5f32bb1c
commit a87d20e238
24 changed files with 1092 additions and 0 deletions
+35
View File
@@ -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()
})
})
}
}