Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Carpet Discarpet Wiki › Guides › Monitor Server Statistics and Post Them to Discord

Monitor Server Statistics and Post Them to Discord

Setting Up Periodic Updates

Use Scarpet's scheduling capabilities to run a function at regular intervals. This function will gather server statistics—player count, TPS, memory usage, or custom metrics from Carpet.

Collecting Minecraft Data

Carpet provides deep access to server information. Your Scarpet script can query the number of loaded entities, active chunks, player positions, or any data Carpet exposes. Compile this information into a readable format.

Sending to Discord

Use the Discord message function to send your formatted statistics to a designated Discord channel. You can send this as a simple text message or format it for readability.

Customizing the Report

Adjust the update interval to suit your needs—every 5 minutes, hourly, or on-demand. You can create multiple monitoring functions for different statistics, or combine everything into one comprehensive report. Consider sending alerts when metrics exceed thresholds, like when TPS drops significantly or player count reaches a limit.