#Can't access/print a Map

11 messages · Page 1 of 1 (latest)

versed citrusBOT
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
supple parrot

and share what is on MessageCreate.ts

tender vault

since you run your main.ts and then import it from your MessageCreate.ts file this sounds like a circular dependency issue

supple parrot

circular dependencies occur when two parts of your code depend on each other, either directly or indirectly, and the engine doesn't know how to work around that

you could try saving your commands in a different file, and then access that one in both files

you can also save your commands in the client as an extra property

which is a common approach

acoustic cobaltBOT

We highly recommend you extend the Client structure properly instead of just attaching custom properties like .commands to the regular discord.js Client instance.

median mist

woa

nvm 😭

median mist

i thought this thread was what i was looing for