Logging

Error and warning logs

Error and warning logs provide important information about issues the bot encounters while running. These logs are designed to alert you to problems that may affect the bot's ability to function correctly. For example, if your server does not have the correct role hierarchy or permissions required to perform certain actions, a warning or error will be logged here.

Common scenarios that generate error or warning logs include missing permissions, requests, misconfigured settings, or attempts to perform actions that are restricted by Discord's rules. The logs will typically include a timestamp, a brief description of the issue, and sometimes additional context to help you understand what went wrong.

Reviewing these logs regularly helps you identify and resolve configuration issues, permission problems, or unexpected errors. For example, if a command fails because the bot lacks the "Manage Messages" permission, the log will indicate this so you can adjust your server settings accordingly. Similarly, if the bot encounters an unexpected error, the log entry can provide clues for troubleshooting or reporting the issue.

Staying informed through these logs ensures the bot remains reliable and responsive. It is recommended to check the error and warning logs after making changes to your server configuration, installing new plugins, or updating the bot. Promptly addressing any issues reported in the logs will help maintain a smooth and stable experience for your users.