Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

145
Views
JavaScript incrustado no funciona para discord

Oye, estaba haciendo un bot de precio criptográfico, pero no me permite enviar una inserción. ¿Alguien puede verificar mi código si cometí algún error? He intentado muchas cosas diferentes, pero nada parece funcionar, ni siquiera cambiar los permisos del canal. Puede haber un error en mi código. No sé si hay alguien que pueda ayudar. Por favor, ayúdame, por favor.

 const Discord = require("discord.js") const client = new Discord.Client() const mySecret = process.env['TOKEN'] const CoinGecko = require('coingecko-api'); const CoinGeckoClient = new CoinGecko(); const { MessageEmbed } = require('discord.js'); client.on("ready", () => { console.log(`------`) console.log(`Succesfull login as ${client.user.tag}`) console.log(`------`) client.user.setActivity('Doge Dash price', { type: 'WATCHING' }); }) client.on("message", msg => { if (msg.content === '$price') { const exampleEmbed = { color: 0x0099ff, title: 'Some title', url: 'https://discord.js.org', author: { name: 'Some name', icon_url: 'https://i.imgur.com/AfFp7pu.png', url: 'https://discord.js.org', }, description: 'Some description here', thumbnail: { url: 'https://i.imgur.com/AfFp7pu.png', }, fields: [ { name: 'Regular field title', value: 'Some value here', }, { name: '\u200b', value: '\u200b', inline: false, }, { name: 'Inline field title', value: 'Some value here', inline: true, }, { name: 'Inline field title', value: 'Some value here', inline: true, }, { name: 'Inline field title', value: 'Some value here', inline: true, }, ], image: { url: 'https://i.imgur.com/AfFp7pu.png', }, timestamp: new Date(), footer: { text: 'Some footer text here', icon_url: 'https://i.imgur.com/AfFp7pu.png', }, }; msg.channel.send({ embeds: [exampleEmbed] }); } if (msg.content === '$test') { msg.channel.send("test") } }) async function getPrice(msg) { let data = await CoinGeckoClient.simple.price({ ids: ['doge-dash'], vs_currencies: ['eur', 'usd'], }); string(data) msg.reply(data) } client.login(mySecret)
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!