CommandsMiscellaneous
Command ping
The ping command allows users to check the latency of the bot. This is useful for monitoring the responsiveness of the bot and ensuring that it is functioning properly.
Description
When the ping command is invoked, the bot will respond with the current latency times for the API, the bot itself, and the MySQL database.
Usage
Permissions
- User: Everyone
Category
- Category: MISCELLANEOUS
How It Works
- When a user invokes the
pingcommand, the bot will initially reply with a message indicating that it is searching. - The bot then records the current time to measure how long the database query takes.
- It queries the database to retrieve information related to the server.
- After the query is completed, the bot calculates the time taken for the database response.
- Finally, the bot constructs an embed message that displays:
- The API latency
- The bot's response time
- The MySQL query time
- The bot edits the initial reply to include the embed with the latency information.
This command is particularly useful for server administrators and users who want to ensure that the bot is responsive and functioning correctly.