#Slashcommand for maxLength

30 messages · Page 1 of 1 (latest)

old coral
#

• 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.

crystal perch
#

I don't know what's the problem, is it available ?

grand lagoon
#

how are you deploying your commands?

crystal perch
#

like that:

const { REST, Routes } = require('discord.js');
const rest = new REST({ version: '10' }).setToken('<token>');

const commands = [array of slashcommands].map(command => command.applicationCommandBody);
await rest.put(Routes.applicationGuildCommands('client id', g.id), { body: commands });

Slash commands deploy correctly but only maxLength is not working

grand lagoon
#

then you should be using snake_case (e.g. max_length), since that's what discord expects

crystal perch
#

I already tried to use that but it's not working too

grand lagoon
#

I'm assuming this is after redeploying with max_length instead
could you log the result of rest.put to confirm the option is not updated?

crystal perch
#

Ok wait i filter the result

grand lagoon
#

looks like it deployed properly

#

so if the issue persists, it's on discord's end

crystal perch
#

Did u test to see if this is working on slashcommand ?

grand lagoon
#

or at the very least your discord client

grand lagoon
crystal perch
#

I swear, that's not me, everything working well, expect this

grand lagoon
#

I am not having issues with this at the moment

crystal perch
#

wtf

#

What's your options?

grand lagoon
#

again though, your issue has nothing to do with your code

crystal perch
#

What do u mean not my code?

grand lagoon
#

if you are able to execute the command with a string longer than 100 characters, this is an issue with your discord client or discord itself

grand lagoon
crystal perch
#

(If it is) How it can be my discord client ?

grand lagoon
#

¯_(ツ)_/¯

crystal perch
#

...

#

It's really weird

#

I think it's discord but how to fix it ? idk

grand lagoon
#

I suppose first I should confirm, you are attempting to execute the command with that as the option value right?
not just typing it in?

crystal perch
#

Y i can write press on my key enter with +100 characters length