Music
joinVoice
$joinVoice[]
Joins a voice channel; if no channel ID is given, joins the user's current voice channel
Syntax
$joinVoice[channelID?]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| channelID | snowflake | Optional |
user's current voice channel
|
The ID of the voice channel to join. If omitted, joins the channel the command user is currently in |
Return Value
void
Joins the voice channel; does not return a value
Joins a Discord voice channel. If no channel ID is provided, the bot automatically joins the voice channel that the command user is currently connected to. If the user is not in a voice channel, the join will fail. This is called automatically by $playMusic if the bot is not already connected.
Examples
Join the user's voice channel
$joinVoice[]
$sendMessage[🔊 Joined your voice channel!]
Join a specific voice channel
$joinVoice[1234567890123456789]
$sendMessage[🔊 Joined the voice channel!]
Join and start playing music
$joinVoice[]
$playMusic[lofi hip hop]
$sendMessage[🎵 Now playing lofi beats!]
Join a voice channel from a variable
$joinVoice[$voiceChannelID]
$sendMessage[🔊 Joined <#$voiceChannelID>]