#CommandInteraction Option max_value

49 messages · Page 1 of 1 (latest)

hallow olive
#

Hey,
i have the following options configured:

options: [
    {
      name: "amount",
      description: "The amount of messages to delete",
      type: "NUMBER",
      required: true,
      max_value: 100,
    },
  ],

When i deploy my data then the command doesnt show up :/

glossy jasper
#

The whole command or just the option

hallow olive
#

the whole command

jade lance
#

I am pretty sure discord.js v13.8 does not support that

hallow olive
jade lance
#

Yes, I know

#

How are you deploying it? Through /rest or discord.js?

blazing tapir
#

13.8 supports max_value. Using it just fine.

hallow olive
glossy jasper
#

And does it work if deployed without that option? Do you get any error?

hallow olive
#

i know what the error is

#

the max_value

#

Is there anyway to use this in JSON data?

blazing tapir
#

If you use the option but don't add max_value, does it work then?

hallow olive
#

with max it does not work

blazing tapir
#

And you're using the builder instead of just regular JSON?

hallow olive
#

no i use JSON

blazing tapir
#

I'm just checking with what I have, I do also have a min_value as well, I'm not sure why it would be a limitation, but you could try that just to make sure.

jade lance
#

So I just deployed this with discord.js 13.8, and it does get sent to the API and it is returned

#

It just seems the client-side validation on this is shit

blazing tapir
#

Yeah it gets sent just fine (this is from a global command fetch())

hallow olive
#

oh wait a sec

jade lance
#

In the GIF I managed to send 5, but if I put a number over 10, it suddenly starts validating wait nvm

hallow olive
#

i used max_value @blazing tapir uses maxValue

blazing tapir
#

I mean could try, but this is not what I send to Discord.

jade lance
#

Either will work

#

But your problem is that you deploy it and the whole command doesn't show up

#

I just copied and pasted your command data on version 13.8 and it showed up

hallow olive
#

With maxValue it worked

blazing tapir
#

Nice!

jade lance
#

That doesn't add up with what you initially said 🤔

#

But glad it works now

hallow olive
#

i deployed the command with the options i posted.
then the command wont show up

if i change max_value to maxValue it worked

jade lance
#

Yeah it just doesn't work like that

#

If an option doesn't exist, it just won't get parsed

hallow olive
#

mmmh

jade lance
#

So changing that key wouldn't have solved it

#

Anyway shrugs

#

Discord ✨

hallow olive
#

oh wait know its working with max_value

#

am i dumb?! 😄

#

thank you @jade lance @blazing tapir @glossy jasper for your help

#

have i nice evening

jade lance
#

You too