- The database MongoDB has been removed and replaced with YAML for simplicity.
- The client ID is no longer required, the handler will wait until the bot logs in and then register the application commands. For development, the guild ID must be set in config.js.
- The bot now calculates attempts when trying to log in. If it fails, the Node.js process won't stop, it will retry until the bot logs in.
- The handler directory is now in the client directory, and the events used for the handlers are also in separate files, and they're no longer in the events directory.
- The command type directories have been removed, and have now been replaced with a private property
__type__
in the command classes and other classes too, and the property is only used when the handler is reading the files. Here are the values for the type: ApplicationCommand = 1, MessageCommand = 2, Component = 3, AutocompleteComponent = 4, Event = 5.
- When you create a command, event, or component, you must export it as an object, so the
toJSON()
function must be used at the end of each class:
module.exports = new ClassName({ ...data }).toJSON();
- Added terminal.log file, which saves previous console messages. This is an important feature for hosting services because when you try to refresh the host panel, the console gets cleared out, while the terminal.log file still saves the messages.
- Improved console logging: Added the time (
Hours:Minutes:Seconds
) on each prefix of console messages so you can get to know when the messages were sent.
- Removed useless features such as moderation logs, because this might make the project look like a Discord Moderation bot.