This page provides a comprehensive reference of all gateway events available in Fluxer.Net. Events are fired by the GatewayClient when real-time updates occur.
Fires when the gateway connection is established and initial data is received.
gatewayClient.Ready += (data) =>
{
// data.SessionId - Session ID for resuming
// data.User - Current user information
// data.Guilds - List of guilds
// data.PrivateChannels - List of DM channels
// data.Relationships - List of friends/blocks
};
Fires when a disconnected session is successfully resumed.
gatewayClient.Resumed += () =>
{
Console.WriteLine("Session resumed!");
};
Fires when the gateway acknowledges a heartbeat (connection health check).
gatewayClient.HeartbeatAck += () =>
{
// Connection is healthy
};
Fires when a new message is sent in any channel the user has access to.
gatewayClient.MessageCreate += async (data) =>
{
// data.Message.Id - Message ID
// data.Message.ChannelId - Channel where message was sent
// data.Message.Author - User who sent the message
// data.Message.Content - Message text content
// data.Message.Attachments - List of attachments
// data.Message.Embeds - List of embeds
// data.Message.Mentions - List of mentioned users
};
Fires when a message is edited.
gatewayClient.MessageUpdate += (data) =>
{
// data.Message - Updated message data
// Note: May be partial data containing only changed fields
};
Fires when a message is deleted.
gatewayClient.MessageDelete += (data) =>
{
// data.Id - Deleted message ID
// data.ChannelId - Channel where message was deleted
};
Fires when multiple messages are deleted at once (e.g., purge).
gatewayClient.MessageDeleteBulk += (data) =>
{
// data.Ids - List of deleted message IDs
// data.ChannelId - Channel where messages were deleted
};
Fires when a message is acknowledged as read by the current user.
gatewayClient.MessageAck += (data) =>
{
// data.MessageId - Message that was acknowledged
// data.ChannelId - Channel of the message
};
Fires when a channel is created.
gatewayClient.ChannelCreate += (data) =>
{
// data.Channel - The created channel
};
Fires when a channel is updated (name, topic, permissions, etc.).
gatewayClient.ChannelUpdate += (data) =>
{
// data.Channel - Updated channel data
};
Fires when a channel is deleted.
gatewayClient.ChannelDelete += (data) =>
{
// data.Channel - Deleted channel data
};
Fires when a message is pinned or unpinned in a channel.
gatewayClient.ChannelPinsUpdate += (data) =>
{
// data.ChannelId - Channel where pins changed
// data.LastPinTimestamp - When the last pin occurred
};
Fires when a user is added to or removed from a group DM.
gatewayClient.ChannelRecipientAdd += (data) =>
{
// data.ChannelId - Group DM channel
// data.User - User who was added
};
gatewayClient.ChannelRecipientRemove += (data) =>
{
// data.ChannelId - Group DM channel
// data.User - User who was removed
};
Fires when the bot joins a guild or when a guild becomes available after an outage.
gatewayClient.GuildCreate += (data) =>
{
// data.Guild - Full guild data including channels, roles, members
};
Fires when a guild is updated (name, icon, settings, etc.).
gatewayClient.GuildUpdate += (data) =>
{
// data.Guild - Updated guild data
};
Fires when the bot is removed from a guild or the guild becomes unavailable.
gatewayClient.GuildDelete += (data) =>
{
// data.Id - Guild ID that was deleted/left
};
Fires when a user is banned or unbanned from a guild.
gatewayClient.GuildBanAdd += (data) =>
{
// data.GuildId - Guild where ban occurred
// data.User - User who was banned
};
gatewayClient.GuildBanRemove += (data) =>
{
// data.GuildId - Guild where unban occurred
// data.User - User who was unbanned
};
Fires when the list of emojis in a guild is updated.
gatewayClient.GuildEmojisUpdate += (data) =>
{
// data.GuildId - Guild where emojis changed
// data.Emojis - Updated list of emojis
};
Fires when the list of stickers in a guild is updated.
gatewayClient.GuildStickersUpdate += (data) =>
{
// data.GuildId - Guild where stickers changed
// data.Stickers - Updated list of stickers
};
Fires when a new member joins a guild.
gatewayClient.GuildMemberAdd += (data) =>
{
// data.GuildId - Guild the member joined
// data.Member - Member data including user and roles
};
Fires when a member is updated (nickname, roles, avatar, etc.).
gatewayClient.GuildMemberUpdate += (data) =>
{
// data.GuildId - Guild where member was updated
// data.Member - Updated member data
};
Fires when a member leaves a guild or is kicked/banned.
gatewayClient.GuildMemberRemove += (data) =>
{
// data.GuildId - Guild the member left
// data.UserId - User who left
};
Fires when a new role is created in a guild.
gatewayClient.GuildRoleCreate += (data) =>
{
// data.GuildId - Guild where role was created
// data.Role - The created role
};
Fires when a role is updated.
gatewayClient.GuildRoleUpdate += (data) =>
{
// data.GuildId - Guild where role was updated
// data.Role - Updated role data
};
Fires when a role is deleted.
gatewayClient.GuildRoleDelete += (data) =>
{
// data.GuildId - Guild where role was deleted
// data.RoleId - ID of the deleted role
};
Fires when a user's presence (online status) changes.
gatewayClient.PresenceUpdate += (data) =>
{
// data.User - User whose presence changed
// data.Status - New status (Online, Idle, DoNotDisturb, Invisible)
// data.ClientStatus - Status per client (web, mobile, desktop)
};
Note: This can be a high-volume event. Consider filtering it out if you don't need it:
var config = new FluxerConfig
{
IgnoredGatewayEvents = new List { "PRESENCE_UPDATE" }
};
Fires when a user starts typing in a channel.
gatewayClient.TypingStart += (data) =>
{
// data.ChannelId - Channel where typing started
// data.UserId - User who started typing
// data.Timestamp - When typing started
};
Fires when a user stops typing.
gatewayClient.TypingStop += (data) =>
{
// data.ChannelId - Channel where typing stopped
// data.UserId - User who stopped typing
};
Fires when a user adds a reaction to a message.
gatewayClient.MessageReactionAdd += (data) =>
{
// data.UserId - User who added the reaction
// data.ChannelId - Channel containing the message
// data.MessageId - Message that was reacted to
// data.Emoji - The emoji that was used
};
Fires when a user removes a reaction from a message.
gatewayClient.MessageReactionRemove += (data) =>
{
// data.UserId - User who removed the reaction
// data.ChannelId - Channel containing the message
// data.MessageId - Message the reaction was removed from
// data.Emoji - The emoji that was removed
};
Fires when all reactions are removed from a message.
gatewayClient.MessageReactionRemoveAll += (data) =>
{
// data.ChannelId - Channel containing the message
// data.MessageId - Message that had all reactions cleared
};
Fires when all instances of a specific emoji are removed from a message.
gatewayClient.MessageReactionRemoveEmoji += (data) =>
{
// data.ChannelId - Channel containing the message
// data.MessageId - Message that had emoji removed
// data.Emoji - The emoji that was removed
};
⚠️ Note: Voice functionality in Fluxer.Net is in very early alpha. See the Voice Client Guide for current limitations.
Fires when a user joins, leaves, or updates their state in a voice channel.
gatewayClient.VoiceStateUpdate += (data) =>
{
// data.GuildId - Guild where voice state changed
// data.ChannelId - Voice channel (null if user left)
// data.UserId - User whose voice state changed
// data.SessionId - Voice session ID
// data.Deaf - Whether user is deafened
// data.Mute - Whether user is muted
// data.SelfDeaf - Whether user self-deafened
// data.SelfMute - Whether user self-muted
};
Fires when voice server information is updated (used for establishing voice connections).
gatewayClient.VoiceServerUpdate += (data) =>
{
// data.Token - Voice authentication token (LiveKit JWT)
// data.GuildId - Guild ID
// data.Endpoint - Voice server endpoint (LiveKit server)
// These events are needed to establish a voice connection
// See /guides/voice-client.html for usage
};
Fires when a relationship (friend, pending friend request, block) is added.
gatewayClient.RelationshipAdd += (data) =>
{
// data.Id - User ID
// data.Type - Relationship type (friend, blocked, etc.)
// data.User - User information
};
Fires when a relationship is updated (e.g., friend request accepted).
gatewayClient.RelationshipUpdate += (data) =>
{
// data.Id - User ID
// data.Type - Updated relationship type
};
Fires when a relationship is removed (unfriend, unblock).
gatewayClient.RelationshipRemove += (data) =>
{
// data.Id - User ID
// data.Type - Previous relationship type
};
Fires when a new invite is created.
gatewayClient.InviteCreate += (data) =>
{
// data.Code - Invite code
// data.GuildId - Guild the invite is for
// data.ChannelId - Channel the invite was created in
// data.Inviter - User who created the invite
};
Fires when an invite is deleted or expires.
gatewayClient.InviteDelete += (data) =>
{
// data.Code - Deleted invite code
// data.GuildId - Guild the invite was for
// data.ChannelId - Channel the invite was in
};
Fires when the current user's account is updated.
gatewayClient.UserUpdate += (data) =>
{
// data.User - Updated user data
};
Fires when user settings are updated.
gatewayClient.UserSettingsUpdate += (data) =>
{
// data.Settings - Updated settings
};
Fires when user guild-specific settings are updated.
gatewayClient.UserGuildSettingsUpdate += (data) =>
{
// data.GuildId - Guild where settings changed
// data.Settings - Updated guild settings
};
To reduce bandwidth and improve performance, you can filter out events you don't need:
var config = new FluxerConfig
{
IgnoredGatewayEvents = new List
{
"PRESENCE_UPDATE", // High-volume event
"TYPING_START",
"TYPING_STOP",
"MESSAGE_REACTION_ADD", // If you don't care about reactions
"VOICE_STATE_UPDATE" // If you don't use voice
}
};