Interface AudioEventMap

Audio event map for typed .on() handlers.

interface AudioEventMap {
    audio: AudioFrame;
    connected: { guildId: string };
    disconnected: { reason: string };
    error: { reason: string };
    "ptt.start": AudioPttEvent;
    "ptt.stop": AudioPttEvent;
    reconnected: { attempt: number };
}

Properties

audio: AudioFrame

Emitted when a decoded audio frame is received.

connected: { guildId: string }

Emitted when the listener connects to a guild.

disconnected: { reason: string }

Emitted when the connection is lost, with the disconnect reason.

error: { reason: string }

Emitted on a listener error, with the failure reason.

"ptt.start": AudioPttEvent

Emitted when an operator starts transmitting (PTT down).

"ptt.stop": AudioPttEvent

Emitted when an operator stops transmitting (PTT up).

reconnected: { attempt: number }

Emitted when the listener reconnects, with the attempt count.