ExpectedConstraintError Invalid string format

error:
/workspace/Jake-Bot/node_modules/@sapphire/shapeshift/dist/index.js:47
    throw this.error;
    ^

ExpectedConstraintError: Invalid string format
    at Object.run (/workspace/Jake-Bot/node_modules/@sapphire/shapeshift/dist/index.js:1549:64)
    at /workspace/Jake-Bot/node_modules/@sapphire/shapeshift/dist/index.js:113:66
    at Array.reduce (<anonymous>)
    at StringValidator.parse (/workspace/Jake-Bot/node_modules/@sapphire/shapeshift/dist/index.js:113:29)
    at Object.validateName (/workspace/Jake-Bot/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.cjs:11:17)
    at SlashCommandUserOption.setName (/workspace/Jake-Bot/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.cjs:9:16)
    at /workspace/Jake-Bot/src/slashCommands/wallet.js:7:41
    at MixedClass._sharedAddOptionMethod (/workspace/Jake-Bot/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/SharedSlashCommandOptions.cjs:47:50)
    at MixedClass.addUserOption (/workspace/Jake-Bot/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/SharedSlashCommandOptions.cjs:21:17)
    at Object.<anonymous> (/workspace/Jake-Bot/src/slashCommands/wallet.js:7:10) {
  constraint: 's.string.regex',
  given: 'Usuario',
  expected: 'expected /^[\\p{Ll}\\p{Lm}\\p{Lo}\\p{N}\\p{sc=Devanagari}\\p{sc=Thai}_-]+$/u.test(expected) to be true'
}


code:
const { SlashCommandBuilder } = require('discord.js');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('carteira')
        .setDescription(':moneybag: Economia ▹ Informa o saldo do usuario')
        .addUserOption(option => option.setName("Usuario").setDescription("Veja o saldo deste usuario")),

    async execute(client, interaction) {

        await interaction.reply('Em desenvolvimento!');
    },
};
Was this page helpful?