Table of Contents

Class GuildConnectionInvalidatedEventArgs

Namespace
Nyra.EventArgs
Assembly
Nyra.dll

Raised when this guild's player is gone for good, the node's session could not be resumed, or a NodeLink cluster worker crashed and took the player with it.

public sealed class GuildConnectionInvalidatedEventArgs : EventArgs
Inheritance
GuildConnectionInvalidatedEventArgs
Inherited Members

Remarks

A node that gave up reconnecting raises no per-guild event, its guild connections stay registered until the node connects again (unless a Discord-side removal during the outage tears one down with no event), so watch Disconnected with Final for that mode of loss.

The subscription is per instance. A rejoin inside the handler creates a successor connection whose events have no handlers, so subscribe to the returned connection after a reconnect.

Constructors

GuildConnectionInvalidatedEventArgs(ulong, ulong?)

Initializes the event args with the invalidated connection's ids.

public GuildConnectionInvalidatedEventArgs(ulong guildId, ulong? lastChannelId)

Parameters

guildId ulong

The guild whose connection was invalidated.

lastChannelId ulong?

The voice channel the connection last played in, null when none is known.

Properties

GuildId

The guild whose connection was invalidated.

public ulong GuildId { get; }

Property Value

ulong

LastChannelId

The voice channel the connection was last connected to, null when none is known.

public ulong? LastChannelId { get; }

Property Value

ulong?

Remarks

Snapshotted before the invalidation wipes the connection's state, by the time a handler runs, the sender's own channel reads null, this is the channel to rejoin.