how can I load commands dynamically without require
I want to use an async sqlite module but that requires to use import and I can't import files inside code with it
11 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- 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!Unknown Userβ’17mo ago
Message Not Public
Sign In & Join Server To View
I am using the thing from the guide to load commands from other files
Unknown Userβ’17mo ago
Message Not Public
Sign In & Join Server To View
You can't use the import keyword inside code right
I just want to use asqlite-async module but I can't use import if I don't set the type to module and idk how to dynamically load commands from files without require
or should I use an sqlite module that isn't async?
smh you are trying not to send the code
what code exactly
So I just followed the tutorial in the website so what should I do to import modules that require
import
and don't work with require()
import()
you should also await it