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

141
Views
Embed JavaScript Is not working for discord

Hey i was making a crypto price bot but it doesnt let me send a embed can someone check my code if i made any mistakes? i have tried alot of diffrent things but nothing seems to work not even chaning channel permissions There might be a error in my code i dont know if there is anyone that can help please help me pls

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!