#setColor not accepting hex string?

4 messages · Page 1 of 1 (latest)

lilac folioBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

lavish agate
#
    at UnionValidator.handle (/home/seif/EarTensifier/node_modules/@sapphire/shapeshift/dist/index.js:1085:23)
    at UnionValidator.parse (/home/seif/EarTensifier/node_modules/@sapphire/shapeshift/dist/index.js:142:88)
    at EmbedBuilder.setColor (/home/seif/EarTensifier/node_modules/@discordjs/builders/dist/messages/embed/Embed.cjs:47:31)
    at EmbedBuilder.setColor (/home/seif/EarTensifier/node_modules/discord.js/src/structures/EmbedBuilder.js:22:18)
    at Help.run (/home/seif/EarTensifier/src/commands/bot/Help.js:37:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async InteractionCreate.run (/home/seif/EarTensifier/src/listeners/client/InteractionCreate.js:141:13)```
#
const fs = require('fs');
const { ApplicationCommandOptionType, ButtonStyle, ButtonBuilder, ActionRowBuilder, EmbedBuilder } = require('discord.js');

const Command = require('../../structures/Command');
const categories = fs.readdirSync('./src/commands/');

module.exports = class Help extends Command {
    constructor(client) {
        super(client, {
            name: 'help',
            description: {
                content: 'Sends you a detailed list of the bot\'s commands.',
                usage: '[comamnd]',
                examples: ['', 'play', 'seek'],
            },
            aliases: ['commands', 'list'],
            options: [{
                name: 'command',
                type: ApplicationCommandOptionType.String,
                required: false,
                description: 'The command to view the help page of.',
            }],
            slashCommand: true,
        });
    }
    async run(client, ctx, args) {

        const { commands } = ctx.client;
        const data = [];

        const prefix = await ctx.messageHelper.getPrefix();

        const embed = new EmbedBuilder()
            .setAuthor({ name: 'Commands', iconURL: client.user.displayAvatarURL() })
            .setDescription(`A detailed list of commands can be found here: **[eartensifier.net](https://eartensifier.net/#commands)**.\nNeed more help? Join the support server here: **[${client.config.server.replace('https://', '')}](${client.config.server})**.`)
            .setFooter({ text: `For more information on a command: ${prefix}help <command>` })
            .setColor(client.config.colors.default);```
#

Line 37 is the last line