#Can't access/print a Map
11 messages · Page 1 of 1 (latest)
and share what is on MessageCreate.ts
since you run your main.ts and then import it from your MessageCreate.ts file this sounds like a circular dependency issue
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
We highly recommend you extend the Client structure properly instead of just attaching custom properties like .commands to the regular discord.js Client instance.
- Using typescript, you might want to consider casting or augmenting the module type
woa
nvm 😭
i thought this thread was what i was looing for