Play File #1067
Play File
#1067
-
hi there, |
Beta Was this translation helpful? Give feedback.
Answered by
SQKo
Dec 9, 2023
Replies: 1 comment
-
$discord->joinVoiceChannel($channel)->then(function (VoiceClient $voice) { // join voice channel
$voice->playFile('sample-15s.mp3')->then(null, function ($e) { // sample-15s.mp3 is located relatively to your main bot.php file
echo 'ERROR: '.$e->getMessage();
})->done();
})->done(); where But you do not need to always |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
axellotl22
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where
$channel
is a voice channelBut you do not need to always
joinVoiceChannel()
if the bot is already in the channel.