ruvyrias / Exports / RuvyriasEvents
Interface: RuvyriasEvents
Represents the events emitted by Ruvyrias.
Table of contents
Properties
- debug
- nodeConnect
- nodeDisconnect
- nodeError
- nodeReconnect
- playerCreate
- playerDestroy
- playerUpdate
- queueEnd
- raw
- socketClose
- trackEnd
- trackError
- trackStart
Properties
debug
• debug: (...args
: any
[]) => void
Emitted when data useful for debugging is produced.
Type declaration
▸ (...args
): void
Parameters
Name | Type | Description |
---|---|---|
...args | any [] | The arguments emitted with the event. |
Returns
void
Defined in
nodeConnect
• nodeConnect: (node
: Node
) => void
Emitted when a Lavalink node is connected to Ruvyrias.
Type declaration
▸ (node
): void
Parameters
Name | Type | Description |
---|---|---|
node | Node | The connected Lavalink node. |
Returns
void
Defined in
nodeDisconnect
• nodeDisconnect: (node
: Node
, event?
: unknown
) => void
Emitted when a Lavalink node is disconnected from Ruvyrias.
Type declaration
▸ (node
, event?
): void
Parameters
Name | Type | Description |
---|---|---|
node | Node | The disconnected Lavalink node. |
event? | unknown | Additional event data. |
Returns
void
Defined in
nodeError
• nodeError: (node
: Node
, event
: any
) => void
Emitted when a Lavalink node encounters an error.
Type declaration
▸ (node
, event
): void
Parameters
Name | Type | Description |
---|---|---|
node | Node | The Lavalink node that encountered the error. |
event | any | The error event. |
Returns
void
Defined in
nodeReconnect
• nodeReconnect: (node
: Node
) => void
Emitted when Ruvyrias attempts to reconnect with a disconnected Lavalink node.
Type declaration
▸ (node
): void
Parameters
Name | Type | Description |
---|---|---|
node | Node | The Lavalink node being reconnected to. |
Returns
void
Defined in
playerCreate
• playerCreate: (player
: Player
) => void
Emitted when a player is created.
Type declaration
▸ (player
): void
Parameters
Name | Type | Description |
---|---|---|
player | Player | The player instance. |
Returns
void
Defined in
playerDestroy
• playerDestroy: (player
: Player
) => void
Emitted when a player is destroyed.
Type declaration
▸ (player
): void
Parameters
Name | Type | Description |
---|---|---|
player | Player | The player instance. |
Returns
void
Defined in
playerUpdate
• playerUpdate: (player
: Player
) => void
Emitted when a player is updated.
Type declaration
▸ (player
): void
Parameters
Name | Type | Description |
---|---|---|
player | Player | The player instance. |
Returns
void
Defined in
queueEnd
• queueEnd: (player
: Player
) => void
Emitted when a player's queue is completed and going to disconnect.
Type declaration
▸ (player
): void
Parameters
Name | Type | Description |
---|---|---|
player | Player | The player instance. |
Returns
void
Defined in
raw
• raw: (topic
: string
, ...args
: unknown
[]) => void
Emitted when a response is received.
Type declaration
▸ (topic
, ...args
): void
Parameters
Name | Type | Description |
---|---|---|
topic | string | The section from which the event originates. |
...args | unknown [] | The arguments emitted with the event. |
Returns
void
Defined in
socketClose
• socketClose: (player
: Player
, track
: Track
, data
: WebSocketClosedEvent
) => void
Emitted when the websocket connection to Discord voice servers is closed.
Type declaration
▸ (player
, track
, data
): void
Parameters
Name | Type | Description |
---|---|---|
player | Player | The player instance. |
track | Track | The track being played. |
data | WebSocketClosedEvent | Additional data related to the socket close event. |
Returns
void
Defined in
trackEnd
• trackEnd: (player
: Player
, track
: Track
, data
: TrackEndEvent
) => void
Emitted whenever a track ends.
Type declaration
▸ (player
, track
, data
): void
Parameters
Name | Type | Description |
---|---|---|
player | Player | The player instance. |
track | Track | The track that ended. |
data | TrackEndEvent | Additional data related to the track end event. |
Returns
void
Defined in
trackError
• trackError: (player
: Player
, track
: Track
, data
: TrackStuckEvent
) => void
Emitted when a track gets stuck while playing.
Type declaration
▸ (player
, track
, data
): void
Parameters
Name | Type | Description |
---|---|---|
player | Player | The player instance. |
track | Track | The track that got stuck. |
data | TrackStuckEvent | Additional data related to the track stuck event. |
Returns
void
Defined in
trackStart
• trackStart: (player
: Player
, track
: Track
, data
: TrackStartEvent
) => void
Emitted whenever a player starts playing a new track.
Type declaration
▸ (player
, track
, data
): void
Parameters
Name | Type | Description |
---|---|---|
player | Player | The player instance. |
track | Track | The track being played. |
data | TrackStartEvent | Additional data related to the track start event. |
Returns
void