Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Carpet Discarpet Wiki › Guides › Log Minecraft Events to a Discord Channel

Log Minecraft Events to a Discord Channel

Identifying Events to Track

Decide which in-game events matter to you: player joins/leaves, deaths, block placements, mob spawns, or custom Carpet events. Each event type requires a separate listener in your Scarpet script.

Writing Event Listeners

Scarpet allows you to hook into various game events. For each event you want to log, write a function that captures the relevant details—player name, location, item involved, or timestamp. Format this information clearly.

Sending Logs to Discord

When an event triggers, immediately call the Discord message function to post details to your logging channel. Include context: who did what, where, and when. This creates a real-time audit trail accessible from Discord.

Organizing Channels

Consider using separate Discord channels for different event types—one for player activity, another for block changes, another for deaths. This keeps your logs organized and makes it easier to monitor specific activities.

You can also add filtering: only log events from specific players, regions, or dimensions to reduce noise.