Server logs
Open Logs → Server logs at /server-logs. The server-logs plugin has
its own per-server enable switch. Logging starts disabled.
Mochi sends matching events to configured Discord channels. A bounded SQLite outbox keeps pending event bodies until Discord confirms delivery. Delivered bodies are removed. Read completed logs in Discord.
Setup
- Open Log settings. Manage Server is required.
- Choose a default staff text channel. You can set a channel for an event group, then set an event-specific channel where needed. Mochi needs View Channel, Send Messages, and Embed Links in each destination. You need View Channel and Send Messages there.
- Select event types. Optionally exclude channels and categories.
- Select Enable server logging, then save.
Routing uses this order: event channel, event group channel, then default channel. An empty channel setting inherits from the next level. You can leave the default empty if every selected event has an event or group channel. Clear an event channel to inherit from its group or the default. Clear a group channel to use the default for its events. Each log channel receives events from included source channels. Select a channel whose members should have access to those messages. Announcement channels and threads cannot be destinations. Discord permissions control who can read the messages there.
These logs are separate from invite attribution logs, moderation cases, and the dashboard audit log. Staff changes to logging settings still appear in the dashboard audit log.
Event types
- Messages: edits, pin and unpin actions, deletions, and bulk deletions.
- Reaction removals: all reactions removed from a message, or one emoji's reactions removed. Individual reaction adds and removals are not logged.
- Channels and threads: creation, deletion, and changes to names, parents, permission overwrites, topics, slowmode, voice settings, and thread settings. The opt-in Webhooks changed event reports only the channel. Discord does not identify the webhook, change type, or actor in this event. It is skipped when discord.js does not have the channel cached. The same change can also appear under Staff actions when that switch is enabled.
- Roles: creation, deletion, permissions, colour, role position, and display options.
- Members: joins, leaves, nickname and profile changes, timeout state, screening state, and boosts. Member role changes and timeout audit changes have their own event switches. Timeout audit entries require View Audit Log. Timeout changes can also appear in other member changes or Mochi case logs.
- Voice: joins, leaves, moves, mute and deafen state, streaming, camera state, and stage speaker state. Server mute or deafen audit changes have their own event switch and require View Audit Log. These entries can appear separately from voice state logs. Moderator moves and disconnects can also be logged from Discord's audit log. These entries report counts only and do not identify the affected members. Channel and category exclusions check the known destination for moves. Discord does not supply a source channel for disconnect entries, so those exclusions cannot apply. These entries can appear separately from voice move or leave logs and require View Audit Log. Mochi does not connect to voice or record audio.
- Moderation: Discord ban events and completed Mochi cases, with a separate switch for each case action. Optional Discord audit switches record moderator kicks and member prunes.
- AutoMod: rule triggers, and AutoMod rule creation, changes, and deletion.
- Events and stages: scheduled event creation, updates, status changes, and deletion, plus stage session creation, updates, and end.
- Staff actions: new Discord audit entries, including the supplied actor, target, reason, and selected changed fields.
Member kick and member prune switches are off by default. A kick log includes the target and actor when Discord supplies them. A prune log includes only the removed-member count and inactivity days. Discord does not identify the pruned members in this audit entry. The actor exclusion applies to both event types; the kick target exclusion also applies. These events have no source channel, so channel and category exclusions do not apply. A kick can also create a Mochi moderation case when case import is enabled. The Staff actions switch can also record the same audit entry. When both are enabled, Mochi suppresses the generic entry only when it reaches the same channel as the specific event. Different channels can receive both entries.
- Server settings, emoji, and sticker changes. Onboarding and integration audit entries have separate opt-in switches and require View Audit Log. They use Discord's bounded audit entry fields. These entries have no source channel, so channel and category exclusions cannot apply. The Staff actions switch can also log the same entry. If the switches use different destinations, both channels can receive an entry.
- Invite link creation, deletion, and updates reported by the Discord audit log.
- Command use: completed or failed command handlers for Mochi's slash commands.
- Tickets: successful ticket closure, after the complete transcript was saved.
Command use, ticket closure, moderation case, message pin and unpin, webhook changes, member boost start and end, reaction-removal, AutoMod, and scheduled event and stage types are separate switches. Existing servers do not enable new event types automatically. Select them and save to enable them. Each event type supports its own destination. Event groups also support a shared destination. Event-specific destinations take precedence over group destinations. Each group can also be disabled as a whole. Disabling a group keeps its individual event selections and routes. Re-enable the group to use those saved selections again. Disabled groups do not require a log destination while logging is enabled, but at least one selected event in an enabled group must have a destination. User and source-channel exclusions apply where those IDs are known.
Reaction-removal logs include the message and channel IDs, message author when available, and the removed emoji when Discord supplies one. They do not identify the person who removed the reactions. AutoMod action logs include the rule, trigger type, action, user, channel, message ID, and matched keyword when supplied by Discord. AutoMod rule logs include selected rule settings. Rule changes use Discord's AutoMod rule events. If both AutoMod rule logging and staff audit logging are enabled, the same rule change can appear in both event types. These logs do not include the message text that triggered AutoMod.
Scheduled event logs include the name, description, status, event type, channel, creator, start and end times, privacy level, and attendee count when supplied by Discord. External event locations, images, and recurrence rules are omitted. Status changes have their own switch. Stage instance logs include the stage channel, topic, privacy level, and linked scheduled event ID. The generic staff audit switch can also log scheduled event changes as separate audit entries.
Command logs include the command text and supplied option values, user ID, avatar, and known highest role, matching Athena's command template. They describe an attempted command, not proof that a moderation action succeeded. Other bots' commands are not visible to Mochi. Choose a staff-only log destination.
Ticket closure logs include the ticket number, channel name, creator, support role, category, closing actor, time open, reason, and transcript availability. Transcript messages, form answers, and private ticket details are not copied. Read the transcript through the existing ticket dashboard access controls.
Mochi moderation case switches cover warnings, timeouts, timeout removals, kicks, bans, unbans, AutoMod actions, honeypot softbans, and global protection bans. They record completed cases with the actual case number, target, actor, action source, reason, and known duration. Evidence stays in the case dashboard. Discord ban events and staff audit actions have separate switches. Imported Discord actions can produce both an audit log and a completed case log if both are enabled. Standalone audit moderation logs do not invent case numbers.
Voice logs show the user, channel, mute and deafen state, avatar, and individual changed values. Joining and leaving show the channel transition without flag initialization/reset noise. While connected, boolean changes require known values on both sides. Leave metadata uses the last connected state. State values use check/cross indicators; timestamps use Discord's relative display with exact times available on hover. Message logs show the author, author ID, message ID, channel, poll state when known, and available message text. Edited messages have separate Old message and New message fields. Pin and unpin logs identify the message and channel. They do not identify the person who pinned it. Deletion logs do not claim the author performed the deletion.
Role logs show the name, role ID, emoji, colour, time, and actor when a matching audit entry is available. Role creation/deletion matches require the same role ID, action and role name. Supported role updates compare old and new values.
Choose individual event types, or use the group checkboxes. Bots are included, like Athena. To omit a specific member or bot, add its ID to Excluded members and bots. There is no separate bot-wide or message-content toggle.
Mochi requests Guild Members, Guild Moderation, Guild Messages, Message Content, Guild Voice States, Guild Invites, Guild Webhooks, Guild Expressions, Guild Message Reactions, AutoModeration Configuration, AutoModeration Execution, and Guild Scheduled Events. Guild Members and Message Content must also be enabled in the Discord developer portal. Guild Message Reactions is needed for reaction-removal events. The AutoModeration intents are needed for AutoMod action and rule events. Guild Scheduled Events is needed for scheduled event changes. Stage instance events use the Guilds intent. View Audit Log is needed for staff audit entries. The settings page shows whether Mochi currently has View Audit Log.
Member log layout
Join, leave, member update, and boost logs show the username, user ID, join time, and existing Discord avatar. Role changes have separate Type, Role, and Role ID fields for each added or removed role, within Discord's display limits. Role-only updates can include the actor from an exactly matching audit entry. A missing actor is labelled as not supplied by Discord. Leaving is not assumed to be a kick, ban, or voluntary departure.
The inviter comes from Mochi's existing invite record when invite tracking is enabled and that record's join time matches the member's current membership. Vanity URL, invite link, unknown, and reconciled records remain distinct. Missing or stale records show Unknown. No extra invite history or member snapshots are written for these logs. A first-ever membership is not inferred from incomplete tracking history.
Message text and missing history
Enabled edit and deletion logs include available message text and attachment names automatically, like Athena. There is no extra content switch. Content is sent to Discord and is not saved in Mochi's database. Text appears in code blocks. The Message Content intent must be enabled in the Discord developer portal.
Mochi uses message data supplied by Discord and its current Discord message cache. It does not fetch deleted messages or keep a separate message archive. An uncached message has no recoverable old text. The log states that the text is unavailable. An edit can have new text while its old text is unavailable. Message text is limited to 2,000 characters per snapshot, with a truncation marker. Discord embeds show a bounded summary. Attachment files are not downloaded. Available Discord attachment links are added as buttons. An existing image attachment can be shown in the embed. These links can expire under Discord's attachment rules; Mochi does not archive files.
Bulk deletion sends one log message. It includes up to 100 message IDs and up to ten cached message samples, subject to the Discord embed display limits. Changes caused only by automatic link previews are ignored.
The message author is not treated as the deletion actor. A member leaving is not automatically labelled a kick. Voice moves and server mute changes do not guess an actor. An audit message, or a matched channel or member role update, shows the actor when Discord supplies one. Some Discord actions do not have audit entries.
No historical scan runs at startup. Events missed while Mochi is offline are not recovered. Most events use the time they were observed. Audit messages use the Discord audit entry timestamp. Log text cannot send mention notifications.
Exclusions
Excluding a channel also excludes events from its threads. Excluding a category excludes the category, its child channels, and their threads. A voice move is excluded if either source channel is excluded. Channel moves consider both the old and new category.
Mochi applies exclusions to known source channels on Discord audit messages. Some audit entries identify no source channel, such as a server role change. Channel exclusions cannot apply to those server-wide actions. When an event names a source channel but its category is unavailable, category exclusions cause that event to be skipped. All configured log channels and their threads are excluded from message edit and deletion logs. This prevents logs from being copied between destinations.
Excluded members and bots
Under Exclusions, paste up to 100 user IDs or Discord mentions in Excluded members and bots. Separate entries with spaces, commas, or new lines. In Discord, enable Developer Mode, then right-click a member and select Copy User ID. Remove an ID and save to include that user again.
Mochi skips events when the excluded ID is the known message author, affected member, voice user, banned user, invite creator, or staff action actor or target. Bulk deletion logs omit messages with excluded authors. If every message in the batch is excluded, no bulk deletion log is sent. Discord does not always provide the author of an uncached message or the actor of a channel or role change. Exclusions apply only where a user ID is known. No extra event history is kept to infer IDs.
These exclusions apply to new server log messages. They do not delete existing Discord logs or change invite tracking, XP, moderation cases, or dashboard audit records. The exclusion IDs are stored as settings. Pending delivery bodies are kept separately in the bounded outbox.
Dashboard access
Server managers can change logging settings. Other staff with View server logs under System → Staff access can view the logging status. This grant does not provide Discord channel access or permit configuration changes. The dashboard has no event history, search, or retention controls.
Sending and failures
Logs use named fields, separate old and new values, channel and member references, and the existing server icon. Empty reasons are omitted. Long values and large change lists are shortened to fit Discord's embed limits.
Channel, thread, role-only member updates, and role events can wait up to two seconds for a matching Discord audit entry. Matching requires the same server, target, changed fields, and old/new values. For member roles, the added and removed role IDs must match exactly. Audit timestamps must be recent. At most 100 observations are held in memory during this short window. No observations are written to SQLite. Pending observations are discarded at shutdown. If the buffer is full, events send without waiting for audit details.
A match adds the audit actor to the update. Its separate audit message is omitted only when the update was accepted for sending and both routes use the same channel. Different destinations keep separate messages. Unmatched entries remain separate, and missing actors are labelled as not supplied by Discord. The user exclusion list also applies to a matched actor. Other event types keep their separate audit messages.
Matching events enter a persistent delivery queue. It allows 250 pending events per server and 2,000 in total. Up to four servers send concurrently. Events from one server keep their order. The queue survives a restart. Delivery retries use a stable Discord nonce. Discord can only deduplicate recent requests, so an unconfirmed send can produce a duplicate after a long interruption.
Settings and exclusions are checked again before delivery. An event is removed if logging is disabled, its destination changes, or it is newly excluded. Failed sends retry with a delay, up to 20 attempts or 24 hours. Queue overflow and expired deliveries increase a saved skipped-event counter. The dashboard shows queued events, skipped events, and the latest delivery error. Error metadata contains no message body.
Only pending event bodies are stored. Protect the bot database and its backups. Discord keeps delivered messages until someone deletes them there. The bot does not delete those Discord messages. Requests already sent can still complete when logging is disabled.
The channel-only migration removes the former server-event table and its queued and archived data. It preserves destination, event switches, exclusions, and settings. A later migration removes the former content/bot switches and keeps member-role logging enabled wherever member updates were previously enabled. Older database backups can still contain the old table; restoring them and starting the updated bot applies the removal migration again. Migration 6 adds the new bounded delivery outbox. Migration 7 adds category channel settings. Existing event selections and destinations are preserved. New event types, including pin, unpin, boost start, boost end, reaction-removal, and AutoMod, remain off for existing servers until staff select them. A message pin or unpin remains in the legacy message-edit event when its specific event is not permitted. The same applies to boost changes and member-update logs. When the specific event and legacy event use the same destination, the change is split into its own log. Different destinations receive both event types. Other simultaneous edits or member changes remain in their existing event. Boost logs do not identify an actor. Migration 8 adds disabled event groups. Existing servers start with all groups enabled. Turning a group off does not clear the group's event selections or destinations.
Athena template compatibility
Field order, field titles, code blocks, relative timestamps, status indicators, and the green/red/yellow colours follow the supplied Athena 2.6.1 templates. Existing Discord avatars and server icons are used. Standard Unicode emojis replace Athena's custom emojis. Missing actors, uncached text, forced departures, and unknown invite history are not guessed. A first membership cannot be proved from partial history; known returning members show a cross, otherwise Unique Member shows Unknown. New invitation update logging uses Discord audit entries.
Member role events inherit existing member-update destinations during migration. All explicitly excluded users, source channels, and categories are preserved. Reload an open settings page after the migration because its revision changes.
DM forwarding is disabled by user choice. Messages sent directly to Mochi are not copied to server channels. This does not affect server message logging.