VoiceConnection is the bot in a voice channel of a server: what it plays there, and how it leaves. channel.join() gives one; guild.voice is the one of a server.
Properties
Helpers
toJSON()
console.log and JSON.stringify show: the server, the channel and what plays, never the session or its keys.
Actions
play()
public/ (asset('music/intro.ogg')), a file sent on Discord (the attachment option of a command) or a link. Opus (.ogg, .webm) is sent as is; anything else is converted with ffmpeg, which must then be installed. Stops what was playing. Resolves when it ends, is stopped, or another play() replaces it.
Discord documentation
pause()
resume() goes on from there.
resume()
stop()
play() resolves.
leave()
Types
AudioSource
play() takes: a file of public/ (asset('music/intro.ogg')), a file sent on Discord (the attachment option of a command, or one of message.attachments), or a link starting with https://. See Attachment.
JoinOptions
Whatjoin() takes.
true, since the bot only plays.Errors
join() and play() throw with what to do; the error is shown with the line of your code, like any other.
The bot can't join Lounge: it needs the Connect permission there.
The bot can't join Lounge: it needs the Connect permission there.
play() says the same with Speak.The bot can't join Lounge: it is full (5 people), and the bot does not have the Move Members permission that lets it in anyway.
The bot can't join Lounge: it is full (5 people), and the bot does not have the Move Members permission that lets it in anyway.
Discord did not let the bot join Lounge within 10 s.
Discord did not let the bot join Lounge within 10 s.
public/x.mp3 is not an Opus file (.ogg or .webm), and ffmpeg is not installed to convert it.
public/x.mp3 is not an Opus file (.ogg or .webm), and ffmpeg is not installed to convert it.
.ogg Opus.ffmpeg could not read public/x.wav: …
ffmpeg could not read public/x.wav: …
… is a web page, not a sound: give the link of an audio file or of a stream, or send the file.
… is a web page, not a sound: give the link of an audio file or of a stream, or send the file.
… could not be downloaded: the server answered 404.
… could not be downloaded: the server answered 404.
play() takes a file of public/, like play(asset('music/intro.ogg')), a file sent on Discord, or a link starting with https://.
play() takes a file of public/, like play(asset('music/intro.ogg')), a file sent on Discord, or a link starting with https://.
play() was given something else, like a path written by hand. Use asset().The bot is no longer in this voice channel: join it again with channel.join().
The bot is no longer in this voice channel: join it again with channel.join().