#```js

1 messages · Page 1 of 1 (latest)

thorn zephyr
#
TypeError: (intermediate value).setName(...).setDescription(...).addSubcommand(...).addChoices is not a function
#

this is all i added

    .addChoices(
      { name: "60 seconds", value: 60 * 1000 },
      { name: "5 minutes", value: 5 * 60 * 1000 },
      { name: "10 minutes", value: 10 * 60 * 1000 },
      { name: "30 minutes", value: 30 * 60 * 1000 },
      { name: "1 hour", value: 60 * 60 * 1000 },
      { name: "1 day", value: 24 * 60 * 60 * 1000 },
      { name: "1 week", value: 7 * 24 * 60 * 60 * 1000 },
    ),

candid notch
#

in the subcommand

#

they dont use a subcommand in the example

thorn zephyr
#

u cant use it ?

candid notch
#

i mean wait im stupid

#

you need to create first an string option

#

and in there you can add choices

#

so create an subcommand > create in the subcommand an string option > add choices to the string option

thorn zephyr
#

i have no idea

#

i dont even wanna use the choices

#

how do u make it so if u said like 20m it would do 20 mins

candid notch
#

you dont have to, but your member.timeout() takes ms thats just all

#

you need to convert it

thorn zephyr
#

how u do that

candid notch
#

and thats not djs related too , i mean you can use other packages or do it yourself in a function

#
thorn zephyr
#

i dont know how

#

ok

#

so

#

u

#

um

#

i still haven o idea whatto do ?

candid notch
#

but now you have to use a string option and not a Number option and convert like 2h with f.ex the package it to 2h in ms

thorn zephyr
#

why is java so comefusing 😭

#

si

#

what i do with this package?

candid notch
#

but i sended you all you need

thorn zephyr
#

i have js understanding

#

i watched 3 hours of video

#

i understand most of it

#

but i dont know much discordjs

candid notch
#

you should read the guide then or the docs , i mean if you are facing everytime new errors of things that you can research easy in the guide / docs

thorn zephyr
#

bro that guid is so unhelpfull

#

its not helpung me

#

the examples

#

are usefull

#

but the reading part

#

im not gonna read

candid notch
#

if you think that its your opinion

thorn zephyr
#

and store it all

#

thats not how my brain functions

candid notch
#

but i dont do all for you and that sounds like a "you problem"

#

i linked all you need and sait whats wrong to fix the errors

#

you already said "now its working" so ig all is fine

thorn zephyr
#

ok