Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/discordeno/mod.ts>connectToVoiceChannel

Discord API library for Deno
Extremely Popular
Go to Latest
function connectToVoiceChannel
import { connectToVoiceChannel } from "https://deno.land/x/discordeno@17.2.0/mod.ts";

Connects the bot user to a voice or stage channel.

This function sends the Update Voice State gateway command over the gateway behind the scenes.

Parameters

bot: Bot
  • The bot instance to use to make the request.
guildId: BigString
  • The ID of the guild the voice channel to leave is in.
channelId: BigString
optional
options: AtLeastOne<Omit<UpdateVoiceState, "guildId" | "channelId">>

Returns

Promise<void>