Skip to content
Music joinVoice

$joinVoice[]

Joins a Discord voice channel through the Lavalink music player. Returns an empty string.

Syntax

bdfd
$joinVoice[channelID?]

Parameters

Parameter Description
channelID Optional - ID of the voice channel to join (a positive number, otherwise the error Invalid voice channel ID. is raised). If omitted or empty, the bot joins the voice channel the command author is currently connected to; if the author is not in a voice channel, the error You must be in a voice channel is raised.

Notes

  • Requires a server and a configured music (Lavalink) service, otherwise an error is raised (Music requires a server. / Music service is not configured.).
  • $playMusic also connects the bot to the requested voice channel by itself, so $joinVoice is not needed before it.

Examples

Connect Bot to Voice Channel

$joinVoice
$title[Voice Connected 🔊]
$description[Bot successfully connected to your voice channel!]
$color[#AEEA00]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.