You are reading the documentation for the next version of discord.js. Documentation for v13/v14+ has been moved to old.discordjs.dev

getVoiceConnection

export declare function getVoiceConnection(guildId: string, group?: string): VoiceConnection | undefined;
export declare function getVoiceConnection(guildId: string, group?: string): VoiceConnection | undefined;
Finds a voice connection with the given guild id and group. Defaults to the 'default' group.
Returns
The voice connection, if it exists
NameTypeOptionalDescription
guildIdstringNoThe guild id of the voice connection
groupstringYesthe group that the voice connection was registered with