Skip to content Skip to sidebar Skip to footer

Is There Any Way I Can Make It So I Don't Have To Redeclare Dependencies For Module.exports?

I am working on a discord bot. I'm kinda a new at this, so I followed discordjs.guide for this bot. I was wondering if there was a way I could use module.exports, while not having

Solution 1:

In your app.js file, whatever parameters you pass into execute() will passover to the command file. So just add Discord into the parameters.

command.execute(Discord, message, args);

Make sure the order of parameters is the exact same across all files, otherwise this will cause an error

Post a Comment for "Is There Any Way I Can Make It So I Don't Have To Redeclare Dependencies For Module.exports?"