Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

145
Vistas
How can I pull data from an API into a Discord Embed Message?

I am trying to pull data from an API using GET to display that information in a nice Discord Embed message that updated frequently. How can I use the information it gives me and display it in a discord embed?

Also, how can I make it so that an ID is instead shown as a Name instead of the ID itself?

The APIs I want to use are all here in this repo https://github.com/ToontownRewritten/api-doc

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Just use node-fetch or JavaScript fetch() function

Here is an example (this is a very simplified example and probably will need big adjustments to work properly with your API, as an API requires authentication and no headers were mentioned on this fetch request):

fetch('url')
  .then((response) => {
    return response.json()
  })
  .then((data) => {
    console.log(data)
    const embed = new Discord.MessageEmbed()
    .setTitle('hi')
    .setDescription(data)
    message.channel.send(embed)
  })
  .catch((err) => {
    // Do something for an error here
  })

You change this to your needs, but just to give you a general idea.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda