Git Product home page Git Product logo

Comments (9)

sdanialraza avatar sdanialraza commented on June 22, 2024

I can't seem to reproduce this issue, and it also looks like you're violating YouTube TOS and by proxy Discord's TOS so don't think you'd be getting much help because of that.

from discord.js.

almostSouji avatar almostSouji commented on June 22, 2024

Please use a minimal reproducible sample you tested outside of the context of your production code (or a reduced version) so we can test and evaluate it in isolation without a major setup. I do currently not see how "Blurple" can throw here, given you are on "latest" v14.14.1

I tested the following code

const { EmbedBuilder } = require("discord.js");
console.log(new EmbedBuilder().setColor("Blurple"));

which prints

EmbedBuilder { data: { color: 5793266 } }

without errors, as expected.

from discord.js.

DarkPheonix2122 avatar DarkPheonix2122 commented on June 22, 2024

i am aware that i might be violating youtubes tos but im not using a proxy? this bots was just made so i can listen to music without opening youtube, im using my own cookie too and im the only one using it, its not just this code either, its every line of code every time i try to create an embed builder, no matter what file or command it either gived me invalid permissions error or thhis error everytime i try to create an embed, also i will update that line of code to work on a standalone rq

from discord.js.

DarkPheonix2122 avatar DarkPheonix2122 commented on June 22, 2024
const client = new Discord.Client({
  intents: Object.keys(Discord.GatewayIntentBits).map((a)=>{
    return Discord.GatewayIntentBits[a]
  }),
});
client.on(Discord.Events.ClientReady, async client => {
    let guild = client.guilds.cache.get("guildId");
    let channel = guild.channels.cache.get("ChannelId");
    const embed = new Discord.EmbedBuilder()
      .setColor("BLURPLE")
      .setTitle("Ready")
      .setDescription(`Logged in as <@${client.user.id}>!`)
      .addFields(
        { name: `Commands`, value: `Loaded ${client.commands.size} commands!`, inline: true},
        { name: `Guilds`, value: `loaded in ${client.guilds.cache.size} servers!`, inline: true}
        )
      .setTimestamp()
      .setColor("Blurple")
      .setFooter("Hiigher Startup");
      channel.send({embeds : [embed]})
})
client.on(Discord.Events.MessageCreate, async message => {
    if(message.content.includes("hq.embed")){
        const newEmbed = new Discord.EmbedBuilder()
        .setColor('Blurple')
        .setDescription("discription")
        message.channel.send({ embeds: [newEmbed] })
    }
})
client.login(token)```

that is basically my ready file and example command, when starting bot it also shows this error because its suppost to send that startup embed to the specified channel in the group.

from discord.js.

sdanialraza avatar sdanialraza commented on June 22, 2024

You have BLURPLE there, change that to Blurple

from discord.js.

almostSouji avatar almostSouji commented on June 22, 2024

Usage error, not a bug in the library

from discord.js.

DarkPheonix2122 avatar DarkPheonix2122 commented on June 22, 2024

You have BLURPLE there, change that to Blurple

it is Blurple i just pasted from my test file lmao doesnt matter what it is, i can do hex codes and it will give same error

from discord.js.

DarkPheonix2122 avatar DarkPheonix2122 commented on June 22, 2024

doesnt matter what i do, ive tried color codes, hex colors and just simple text and it just gives the error everytime, i did the code above and console logged it and it outputted with no errors but as soon as i add channel.send to anything it gives that error

from discord.js.

sdanialraza avatar sdanialraza commented on June 22, 2024

As Souji said, it's an usage error, not a bug in the library, please ask in the Discord server if you need help using discord.js

from discord.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.