medallyon / grogsile.org-archive

The (old) Official Bot For ESO International
https://discordapp.com/invite/0jGipOeWW06jNmlL
Apache License 2.0
1 stars 0 forks source link

Change how command modules are exported #105

Closed medallyon closed 6 years ago

medallyon commented 6 years ago

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.
}