lavaclient
Version:
A simple, easy-to-use, and flexible lavalink client for node.js
37 lines • 1.25 kB
TypeScript
import type * as Protocol from "lavalink-protocol";
import { DiscordResource, Snowflake } from "./tools.js";
import { Player } from "./player.js";
import { TypedEmitter } from "tiny-typed-emitter";
export declare class PlayerVoice extends TypedEmitter<PlayerVoiceEvents> {
readonly player: Player;
channelId: string | null;
connected: boolean;
latency: number;
server: Protocol.VoiceState | null;
private voiceUpdate;
constructor(player: Player);
connect(channel: Snowflake | DiscordResource | null, options?: ConnectOptions): this;
disconnect(): this;
handleVoiceUpdate(update: VoiceStateUpdate | VoiceServerUpdate): Promise<boolean>;
}
export interface PlayerVoiceEvents {
channelJoin: (joined: Snowflake) => void;
channelLeave: (left: Snowflake) => void;
channelMove: (from: Snowflake, to: Snowflake) => void;
}
export interface ConnectOptions {
deafened?: boolean;
muted?: boolean;
}
export interface VoiceServerUpdate {
token: string;
endpoint: string;
guild_id: `${bigint}`;
}
export interface VoiceStateUpdate {
session_id: string;
channel_id: `${bigint}` | null;
guild_id: `${bigint}`;
user_id: `${bigint}`;
}
//# sourceMappingURL=playerVoice.d.ts.map