Skip to main content

Overview

Fluxer provides a comprehensive real-time messaging system that supports rich interactions, enabling users to communicate effectively across communities and direct messages.

Core Messaging Features

Text Messages

Send rich text messages with markdown formatting, mentions, and emojis

Message Reactions

React to messages with custom and Unicode emojis

Message Replies

Reply to specific messages to maintain conversation context

Typing Indicators

Show real-time typing status to other users in the channel

Message Reactions

Reactions allow users to respond to messages with emojis without sending a full message.

Adding Reactions

// MessageReactionService handles all reaction operations
await messageReactionService.addReaction({
  authChannel,
  messageId,
  emoji: '👍', // Unicode emoji or 'name:id' for custom emojis
  userId,
  sessionId
});

Reaction Limits

Fluxer enforces configurable limits on reactions:
Default: 20 unique emoji reactions per message. Can be configured via max_reactions_per_message limit.
Default: 100 users can react with the same emoji. Configurable via max_users_per_message_reaction.
Users need USE_EXTERNAL_EMOJIS permission to use custom emojis from other communities. Premium features can enable global emoji usage.

Fetching Reaction Users

// Get users who reacted with a specific emoji
const users = await messageReactionService.getUsersForReaction({
  authChannel,
  messageId,
  emoji: '👍',
  limit: 25,
  after: lastUserId, // For pagination
  userId
});

Removing Reactions

await messageReactionService.removeReaction({
  authChannel,
  messageId,
  emoji: '👍',
  targetId: userId, // Same as actorId
  actorId: userId
});

Message Replies and Threading

Maintain conversation context with message replies and references.

Creating Reply Messages

// Send a reply to an existing message
const message = await messageSendService.sendMessage({
  user,
  channelId,
  data: {
    content: 'This is a reply!',
    message_reference: {
      message_id: originalMessageId,
      type: MessageReferenceTypes.DEFAULT // Standard reply
    }
  },
  requestCache
});

Message Forwarding

Fluxer supports message forwarding, which creates snapshots of original messages when shared to different channels.
// Forward a message to another channel
const forwardedMessage = await messageSendService.sendMessage({
  user,
  channelId: targetChannelId,
  data: {
    message_reference: {
      message_id: sourceMessageId,
      channel_id: sourceChannelId,
      guild_id: sourceGuildId,
      type: MessageReferenceTypes.FORWARD
    }
  },
  requestCache
});
Forwarded messages cannot contain additional content, embeds, or attachments. They preserve the original message content as a snapshot.

Typing Indicators

Show real-time typing status to improve user experience and conversation flow.

Sending Typing Events

// Trigger typing indicator (lasts ~8 seconds)
POST /channels/{channel_id}/typing

// Gateway event dispatched to channel members
{
  "event": "TYPING_START",
  "data": {
    "channel_id": "123456789",
    "user_id": "987654321",
    "timestamp": 1234567890
  }
}

Client Implementation

import {useTypingIndicator} from '@app/hooks/useTypingIndicator';

function MessageInput({ channelId }) {
  const {sendTyping} = useTypingIndicator(channelId);
  
  const handleInputChange = (e) => {
    sendTyping(); // Automatically throttled
    // Handle input...
  };
}

Mentions and Notifications

Fluxer supports rich mention capabilities for users, roles, and special mentions.

Mention Types

User Mentions

@username - Mention specific users

Role Mentions

@role - Mention all users with a role

Everyone/Here

@everyone or @here - Notify all members

Controlling Mentions

const message = await messageSendService.sendMessage({
  user,
  channelId,
  data: {
    content: 'Hello @user1 and @role1!',
    allowed_mentions: {
      parse: ['users'], // Only parse user mentions
      users: [userId1], // Specific users to mention
      roles: [], // No role mentions allowed
      replied_user: false // Don't mention replied user
    }
  },
  requestCache
});

Permission Requirements

SEND_MESSAGES
Permission
required
Required to send messages in guild channels
ADD_REACTIONS
Permission
Required to add new reaction types (first reactor)
MANAGE_MESSAGES
Permission
Required to remove others’ reactions or clear all reactions
MENTION_EVERYONE
Permission
Required to use @everyone, @here, or mention roles
READ_MESSAGE_HISTORY
Permission
Required to interact with messages outside the history cutoff

Gateway Events

Real-time messaging uses WebSocket events for instant updates:
Dispatched when a new message is sent
{
  "t": "MESSAGE_CREATE",
  "d": {
    "id": "123456789",
    "channel_id": "987654321",
    "author": {...},
    "content": "Hello world!",
    "timestamp": "2026-03-04T00:00:00.000Z"
  }
}
Dispatched when a reaction is added
{
  "t": "MESSAGE_REACTION_ADD",
  "d": {
    "channel_id": "987654321",
    "message_id": "123456789",
    "user_id": "111222333",
    "emoji": { "name": "👍" }
  }
}
Dispatched when a reaction is removed
Dispatched when all reactions are cleared from a message
Dispatched when a user starts typing

Best Practices

1

Throttle Typing Indicators

Only send typing events every 5-8 seconds to avoid excessive API calls and gateway traffic.
2

Validate Permissions

Always check permissions before attempting to react or send messages to avoid errors.
3

Handle Reaction Limits

Implement UI feedback when reaction limits are reached to inform users why their action failed.
4

Use Allowed Mentions

Always specify allowed_mentions to prevent unintended mass mentions and spam.

Custom Expressions

Learn about custom emojis and stickers

Communities

Understand guild channels and organization

Media & Embeds

Add rich media to your messages

API Reference

Complete API documentation

Build docs developers (and LLMs) love