Skip to main content

ruvyrias / Exports / RuvyriasEvents

Interface: RuvyriasEvents

Represents the events emitted by Ruvyrias.

Table of contents

Properties

Properties

debug

debug: (...args: any[]) => void

Emitted when data useful for debugging is produced.

Type declaration

▸ (...args): void

Parameters
NameTypeDescription
...argsany[]The arguments emitted with the event.
Returns

void

Defined in

src/Ruvyrias.ts:204


nodeConnect

nodeConnect: (node: Node) => void

Emitted when a Lavalink node is connected to Ruvyrias.

Type declaration

▸ (node): void

Parameters
NameTypeDescription
nodeNodeThe connected Lavalink node.
Returns

void

Defined in

src/Ruvyrias.ts:217


nodeDisconnect

nodeDisconnect: (node: Node, event?: unknown) => void

Emitted when a Lavalink node is disconnected from Ruvyrias.

Type declaration

▸ (node, event?): void

Parameters
NameTypeDescription
nodeNodeThe disconnected Lavalink node.
event?unknownAdditional event data.
Returns

void

Defined in

src/Ruvyrias.ts:224


nodeError

nodeError: (node: Node, event: any) => void

Emitted when a Lavalink node encounters an error.

Type declaration

▸ (node, event): void

Parameters
NameTypeDescription
nodeNodeThe Lavalink node that encountered the error.
eventanyThe error event.
Returns

void

Defined in

src/Ruvyrias.ts:237


nodeReconnect

nodeReconnect: (node: Node) => void

Emitted when Ruvyrias attempts to reconnect with a disconnected Lavalink node.

Type declaration

▸ (node): void

Parameters
NameTypeDescription
nodeNodeThe Lavalink node being reconnected to.
Returns

void

Defined in

src/Ruvyrias.ts:230


playerCreate

playerCreate: (player: Player) => void

Emitted when a player is created.

Type declaration

▸ (player): void

Parameters
NameTypeDescription
playerPlayerThe player instance.
Returns

void

Defined in

src/Ruvyrias.ts:279


playerDestroy

playerDestroy: (player: Player) => void

Emitted when a player is destroyed.

Type declaration

▸ (player): void

Parameters
NameTypeDescription
playerPlayerThe player instance.
Returns

void

Defined in

src/Ruvyrias.ts:285


playerUpdate

playerUpdate: (player: Player) => void

Emitted when a player is updated.

Type declaration

▸ (player): void

Parameters
NameTypeDescription
playerPlayerThe player instance.
Returns

void

Defined in

src/Ruvyrias.ts:273


queueEnd

queueEnd: (player: Player) => void

Emitted when a player's queue is completed and going to disconnect.

Type declaration

▸ (player): void

Parameters
NameTypeDescription
playerPlayerThe player instance.
Returns

void

Defined in

src/Ruvyrias.ts:259


raw

raw: (topic: string, ...args: unknown[]) => void

Emitted when a response is received.

Type declaration

▸ (topic, ...args): void

Parameters
NameTypeDescription
topicstringThe section from which the event originates.
...argsunknown[]The arguments emitted with the event.
Returns

void

Defined in

src/Ruvyrias.ts:211


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
NameTypeDescription
playerPlayerThe player instance.
trackTrackThe track being played.
dataWebSocketClosedEventAdditional data related to the socket close event.
Returns

void

Defined in

src/Ruvyrias.ts:293


trackEnd

trackEnd: (player: Player, track: Track, data: TrackEndEvent) => void

Emitted whenever a track ends.

Type declaration

▸ (player, track, data): void

Parameters
NameTypeDescription
playerPlayerThe player instance.
trackTrackThe track that ended.
dataTrackEndEventAdditional data related to the track end event.
Returns

void

Defined in

src/Ruvyrias.ts:253


trackError

trackError: (player: Player, track: Track, data: TrackStuckEvent) => void

Emitted when a track gets stuck while playing.

Type declaration

▸ (player, track, data): void

Parameters
NameTypeDescription
playerPlayerThe player instance.
trackTrackThe track that got stuck.
dataTrackStuckEventAdditional data related to the track stuck event.
Returns

void

Defined in

src/Ruvyrias.ts:267


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
NameTypeDescription
playerPlayerThe player instance.
trackTrackThe track being played.
dataTrackStartEventAdditional data related to the track start event.
Returns

void

Defined in

src/Ruvyrias.ts:245