WebSocketClosedEvent class

An event sent when the websocket connection to Discord's voice servers is lost.

Inheritance
Annotations
  • @JsonSerializable()

Constructors

WebSocketClosedEvent({required LavalinkClient client, required String opType, required String type, required String guildId, required int code, required String reason, required bool? wasByRemote})
Create a new WebSocketClosedEvent.
WebSocketClosedEvent.fromJson(Map<String, Object?> json)
factory

Properties

client LavalinkClient
The client this message was for.
finalinherited
code int
The close code of the websocket connection.
final
guildId String
The ID of the guild this event occurred in.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
opType String
The type of this message.
finalinherited
reason String
The reason the connection was closed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The type of this event.
finalinherited
wasByRemote bool?
Whether the connection was closed by the remote server (Discord).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited