Open mgiugliano opened 1 year ago
It doesnt work for me either. Python 3.10.6 discord.py version 2.1.0 OS: ubuntu 22.04
Just running the example works, it joins the server. The help command also works, but /join etc do nothing. (i changed the command prefix to /. using ! also does not work)
On discord it returns: The application did not respond
I've found the inconsistency related to this issue in lines 85 and 95 of the example: voice_client.play(...)
is called before the variable player
has been instantiated because the main loop calls YTDLSource.from_url
after the ctx.typing()
closure.
EDIT: After a couple of minutes it seems to work, there is an undefined behaviour in some way.
@Rapptz May I ask you to explain why "no repro" tag is used in this case? It seems other people reported similar problems I did. Thank you for your work.
This issue is a bit old, but the voice connection code for the library has been rewritten. If you're still having this issue, do you mind seeing if it still happens on the latest commit?
Summary
BOT connects to a voice channel but no sound is played
Reproduction Steps
Simply launching the sample code basic_voice.py and exploring all (BOT) commands made it clear that:
Minimal Reproducible Code
Expected Results
I would have expected a .mp3 or .wav file to be played in the voice chat.
Actual Results
BOT joins the voice channel but does not play any sound (YouTube, files, stream, etc.)
Intents
intents = discord.Intents.default()
System Information
Checklist
Additional Context
After several days of struggle, I finally converged on a minimal and working example - below.
As I am not fluent in Discord.py, I would like to understand why the sample code provided by the Author of the library does not work and my "patchwork" shy attempt does.
https://gist.github.com/mgiugliano/25428789c00b8ba1c1073c3e3f2f8294