Skip to Content
Welcome to the Orax Bot documentation!
FeaturesMessage Sync

Message Synchronization

Message synchronization is Orax’s core feature. When a user sends a message in a linked channel, Orax instantly relays it to all other channels in the same interserv group using webhooks.

How It Works

  1. Message Detection — Orax listens for new messages in all linked channels via Discord’s messageCreate event
  2. Validation — The bot checks if the message comes from a linked channel and isn’t from another bot webhook (to prevent loops)
  3. Filtering — The message is checked against word blacklists, message filters, and ban lists
  4. Transformation — The message content is processed:
    • Custom username and avatar patterns are applied
    • Mentions are sanitized and mapped across servers
    • Custom emojis (:!emoji_name:) are resolved
    • Stickers are downloaded and converted if needed
    • Attachments are validated (10MB limit per file)
  5. Relay — The transformed message is sent to all other linked channels via their respective webhooks
  6. Mapping — The original and mirrored message IDs are stored in the database for edit, delete, reaction, and thread sync

What Gets Synced

Content TypeDetails
TextAll text content including markdown, code blocks, and mentions
AttachmentsImages, videos, and files (up to 10MB each)
EmbedsRich embeds, link previews, and bot embeds
StickersAll formats (PNG, APNG, GIF, Lottie) — converted to GIF when needed
PollsDiscord polls are relayed and votes are aggregated on expiry
Forwarded messagesDiscord’s forwarded messages with special formatting
ComponentsDiscord components v2 are supported

Message Direction

Channels can be configured with different message directions:

DirectionBehavior
All messages (default)Messages flow both ways — send and receive
Incoming onlyThe channel receives messages from other servers but doesn’t send its own
Outgoing onlyThe channel sends messages to other servers but doesn’t receive any

Message direction is a per-channel setting that can be configured from the dashboard  or via the channel settings.

Webhooks

Orax creates a webhook in each linked channel. This webhook is used to post messages from other servers. The webhook appears as a regular user in the channel with the sender’s username and avatar (or custom patterns if configured).

Do not delete or modify the Orax webhook in your channel. If the webhook is deleted, message sync will stop working. Use the /debug-channel command to diagnose webhook issues.

Data Retention

Message mapping data (used for sync) is retained for 30 days. After that, old mappings are automatically cleaned up. This means you can edit, delete, react to, or thread on a message for up to 30 days after it was sent, and the action will be synced.

Performance

Orax uses automatic sharding via Discord.js ShardingManager to handle large numbers of servers efficiently. The shard count is automatically determined based on the number of guilds the bot is in.

Last updated on