Skip to content
Fluxer API

Gateway threads

Fluxer sends thread changes, thread member lists and forum unread counts as the Dispatch events below. A user session needs the CHANNEL_THREADS session flag, and a bot session always gets them.

ValueNameDescription
1 << 2CHANNEL_THREADSThe client can parse thread, forum and media channels

Set it in the session flags of Identify. A user session without it gets no thread, forum or media channels, no thread messages and none of the events on this page. Its channels and messages have no thread fields, and its permission values have the thread permissions cleared.

threads on a guild ready object is an array of thread objects. A user session receives the active threads it joined and can view, and a bot session receives every active thread it can view. Each entry has member for a thread the session joined.

EventDescription
Thread CreateA thread is created or the session is added to one
Thread UpdateA thread changes
Thread DeleteA thread is deleted
Thread List SyncThe session's active thread set is replaced
Thread Member UpdateThe session's own thread membership changes
Thread Members UpdateUsers join or leave a thread
Thread Member List UpdateThe full member list of a subscribed thread
Forum UnreadsUnread counts for forum posts

A session that can view a thread gets its thread events when it is a bot session, when the user is a member or when the session turned on threads. A passive session gets fewer of them, as noted under each event.

Messages, reactions, typing and pins in a thread go to a session that can view the thread when it is a bot session, the user is a member, the session lists the thread in thread_member_lists, or the session set threads and the guild is active for it, whatever the guild size. They also follow Event filtering.

A thread is created or the session is added to one. The payload is the thread object with these fields.

FieldTypeDescription
newly_created?booleantrue when the thread was just created, absent when the session was added to an existing thread
member?thread member objectThe session's own membership

A passive session gets it only when its user is a member.

A thread changes, and the payload is the thread object. A message sent to an archived thread unarchives it and sends this event. A passive session gets it only for a thread it joined.

A thread is deleted.

FieldTypeDescription
idsnowflakeThe ID of the thread
guild_idsnowflakeThe ID of the guild
parent_idsnowflakeThe ID of the parent channel
typeintegerThe thread type

A passive session gets it only when its user is a member.

The session's active threads are replaced for a guild or for some of its channels.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
channel_ids?array[snowflake]The parent channels whose threads are replaced, absent for the whole guild
threadsarray[thread object]The active threads the session can view
membersarray[thread member object]The session's memberships in those threads

A user session that did not set threads gets only the threads it joined unless channel_ids is present. Fluxer sends it after Lazy Request sets threads to true and when the session gets view access to channels with active threads. Resume does not replay it.

The session's own membership in a thread changes. The payload is the thread member object plus guild_id. Every session of the user that can view the thread receives it.

Users join or leave a thread.

FieldTypeDescription
idsnowflakeThe ID of the thread
guild_idsnowflakeThe ID of the guild
member_countintegerThe number of thread members, capped at 50
added_members?array[thread member object]The users who joined, each with member and presence
removed_member_ids?array[snowflake]The IDs of the users who left

member is the guild member or null. presence is the presence object or null when the user is not visibly online. A passive session gets it only when its user was added or removed.

The full member list of a thread the session subscribed to with thread_member_lists. Resume does not replay it.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
thread_idsnowflakeThe ID of the thread
membersarray[thread member list item object]The members of the thread, at most 1,000

Each item has user_id, join_timestamp, flags, member and presence. presence is a presence object with status offline when the user is not visibly online.

The answer to Request Forum Unreads.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
channel_idsnowflakeThe ID of the forum or media channel
threadsarray[forum unread object]One entry for each requested post found in the channel

Each forum unread object has thread_id and either count or missing. count is the number of messages after the ack_message_id in the request, capped at 25. missing is true when the request had no valid ack_message_id for that post.

The guild subscription object of Lazy Request takes two more options. Fluxer ignores them for a user session without CHANNEL_THREADS.

FieldTypeDescription
threads?booleanWhether the session gets events and messages for every thread it can view in the guild
thread_member_lists?array[snowflake]The threads whose member lists the session subscribes to, at most 10

threads set to false, or marking the guild passive, clears the subscription.

thread_member_lists replaces the previous list, and an empty array clears it. Fluxer sends a Thread Member List Update right away for each newly listed thread, and sends another 250 ms after that thread's members change.

Opcode 28 requests unread counts for posts in one forum or media channel. Fluxer closes a user session without CHANNEL_THREADS with 4001.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
channel_idsnowflakeThe ID of the forum or media channel
threadsarray[forum unread request object]The posts to count, at most 40

Each forum unread request object has thread_id and an optional ack_message_id, the newest message the client has read in that post.

{
"op": 28,
"d": {
"guild_id": "1189375284394692608",
"channel_id": "1189375284394692700",
"threads": [{"thread_id": "1189375284394692800", "ack_message_id": "1189375284394692900"}]
}
}

Fluxer answers with one Forum Unreads and sends nothing when the guild is unavailable to the session, the channel is not a forum or media channel or the session cannot view it. A connection can send five of these commands in any 5 seconds, and Fluxer drops the rest.