When exporting Command modules, some metadata should be exported with that module through module.exports. This eradicates the need for a commands.json, which stores metadata about those commands. This would also enable being able to reload the command module and the command's metadata in tandem.
This could be done in this way:
module.exports = {
name: "command name",
description: "command description",
execute: function()
{
// command body
}
// , etc.
}
When exporting Command modules, some metadata should be exported with that module through
module.exports
. This eradicates the need for acommands.json
, which stores metadata about those commands. This would also enable being able to reload the command module and the command's metadata in tandem.This could be done in this way: