#defined client as bot, but interaction.bot is undefined

3 messages · Page 1 of 1 (latest)

sick kelp
#

So I have defined Client as "bot" in my index.js, and refer to it wherever needed without issue, until I come to Interactions.
interaction.bot.commands.get() always returns undefined.
logging interaction I don't see client as an output, yet
interaction.client.commands.get() works as expected, am I missing something in my understanding here?

ocean plaza
#

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

brazen fractal
#

The property will be .client independent of how you name your variables