#Unable to get options using ts on InteractionCreate

13 messages · Page 1 of 1 (latest)

paper loomBOT
#

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

sullen badge
#

discord.js: v14.9.0
Node: v19.8.1

cold sluice
#

What is client defined as here? Doesn’t seem to be a Client from discord.js else the destructuring of the callback is just plain wrong

sullen badge
#

This is the client from the official example

const rest = new REST({ version: '10' }).setToken(token);
const ws = new WebSocketManager({
    token,
    intents: GatewayIntentBits.GuildMessages | GatewayIntentBits.MessageContent,
    rest,
});

const client = new Client({ rest, ws });
cold sluice
#

So you use @discordjs/core, not discord.js? Why mention a djs (mainlib) version then?

sullen badge
#

Sorry, I didn't know it was different.

#

Should I change the tag to subpackage ?

cold sluice
#

Depends. Why do you use /core? You either should

  • change the tag or
  • use mainlib instead
    depending on what you actually want
sullen badge
#

I use /core because it was an example on the documentation. And to change you mean to remove the v14.9.0 tag?

cold sluice
#

What documentation? The documentation of the /core package? Because main djs docs don’t use that

sullen badge
cold sluice
#

Read the big blue box at the top…

oak spruceBOT