#discord bot

1 messages · Page 1 of 1 (latest)

shy stirrupBOT
#
webstrand#8856

Preview:```ts
import Discord from "discord.js"
const client = new Discord.Client({} as never)

client.once(Discord.Events.ClientReady, c => {})```

light musk
#

ah

#

tha'ts not the answer

#

was still thinking of your previous question

#

looks like

const client = new Discord.Client({
    intents: []
});

is minimal

#

you probably need to specify some intents, to actually be able to do anything

#

no idea. I'd recommend following a simple tutorial for using d.js

#

trying to intuit how to use a library from types alone is tough to do

#

yep, you need to adjust your "target": "ES2015" in your tsconfig

#

the default target is ES3, if you haven't configured it at all

#

@tsconfig/node18 is a npm package with good defaults for tsconfig

#

that's weird, try restarting tsserver?

#

how are you building?

#

try with tsc -p path/to/your/tsconfig.json

#

can you make a playground demonstrating the erorr?

#

so that I can see the errors and the code you see

#

set that to true in your tsconfig

arctic lichen
#

!close