#Discord JS (porting to TS for fun)

1 messages ยท Page 1 of 1 (latest)

uncut tulip
#

For some reason this doesn't work.

elder trellis
#

client is of type Client, not type IClient

uncut tulip
elder trellis
#

you're extending Client as IClient, but you aren't using IClient

uncut tulip
#

there's an explicit casting

elder trellis
#

oh i completely missed the cast mb

uncut tulip
#

straight after the intent

#

oh

elder trellis
#

blind moment ๐Ÿ’€

#

sorry

uncut tulip
#

nvm i was like ๐Ÿ’€

elder trellis
#

you're using client.feature directly, that looks for the key feature instead of the value of the variable feature

#

you need client[feature]

#

you also need a as const on the array so it doesn't become a string[]

#

also you may want to type your collections more strictly

uncut tulip
#

hold awnn

uncut tulip
#

actually got another question

#

is there an opinionated tsconfig that allows me to start easy n quick