Require Vs Import, trying to "import" another script via the require method.
So I was following the discordjs.guide site on setting up the bot and they used require for everything,
Example ^
So now in one of my slash-commands I'm trying to get one of my scripts, which normally I'd do, for example:
However I need to choose require instead of import, and I followed the code along, so it's a bit too much for me to try and make all the rest of the code and the way it's written utilize the import feature versus require.
So I followed the same format as the others and wrote:
However now I'm getting the error:
No matter what I do, it can't find it properly and I'm not sure what to change as I'm used to the import/export method, and attempting to figure out the require method for this.
Example ^
So now in one of my slash-commands I'm trying to get one of my scripts, which normally I'd do, for example:
However I need to choose require instead of import, and I followed the code along, so it's a bit too much for me to try and make all the rest of the code and the way it's written utilize the import feature versus require.
So I followed the same format as the others and wrote:
However now I'm getting the error:
Error: Cannot find module './apiAccess/hydra.js'No matter what I do, it can't find it properly and I'm not sure what to change as I'm used to the import/export method, and attempting to figure out the require method for this.
