Bibis" ⁵⁴ 🐬
Bibis" ⁵⁴ 🐬
DIAdiscord.js - Imagine an app
Created by Bibis" ⁵⁴ 🐬 on 9/5/2024 in #djs-questions
Rich presence
I'm trying to use the rich presence of my bot, however, when I use client.user.setActivity and pass the activity parameter, the images don't work, the texts work, however, when I change the name parameter to the name of my bot and I use "512x512pngimages" in the large_image parameter. I can use my bot's icon in rich presence, but I cannot use custom images that I uploaded to the art assets page on the developer portal
40 replies
DIAdiscord.js - Imagine an app
Created by Bibis" ⁵⁴ 🐬 on 10/5/2022 in #djs-questions
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'
}
/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!');
},
};
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!');
},
};
3 replies