-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem when my bot tries to connect to a voice channel #9616
Comments
Are you running |
By the way, never sync commands in the |
Chances are, your variable |
@alexraskin Thank you for the advice. I admit I didn't really understand what was the @20kzhan Yes, but I have to do it when I change the code, and it is correlated with the reboots of the bot. @No767 It is impossible because of the |
@Motiver7 You don't really need Also as a side note, the purpose of |
Yes I'm aware of that, I want the check to be active on all the commands of this cog. Basically, they all are commands which make the bot play a sound, stop, etc. so I just check that the person who runs the command is connected to the right vocal channel. But with or without the cog_check the |
Are you sure that you are getting an error? My leading theory would be that the voice channel you are trying to get is |
I just checked in my code, I have an error handler which raises any error for this command (the And apart of any code consideration, I test the bot myself and I am sure to be connected in the right vocal channel when I run the command, so definitely |
@Motiver7 There is no ports actively used for voice connections. Note that you'll get faster support on the discord server instead. |
Summary
The channel.connect() never ends. The bot appears in the channel on Discord, but the code "thinks" he isn't connected.
Reproduction Steps
Minimal Reproducible Code
Expected Results
The bot should connect to the vocal channel, send a message, and then start playing a file via the function
play_song
.It should too print "1" and then "2" in the console.
Actual Results
I get the "1" in the console, but never the "2".
The bot appears connected to the channel on Discord. However, the code below
channel.connect()
is never executed.I made some experiments, and I can see that when I ask for is_connected(), the answer is False.
Intents
intents = discord.Intents.all()
System Information
Checklist
Additional Context
I wrote this code in March 2023 and it worked perfectly. Then I tried it again in July, without any modification, and it wasn't working anymore. It still is broken.
I saw that I'm not the only one with this problem, but I also saw that many people do not have this problem. I suspected a firewall blocking so I disabled it and nothing changed. Still, I am not convinced because I don't know which port is used for the voice channel connection. If anyone knows that, I can try to specifically allow it in my firewall.
I put here only the part of the code which is concerned by the problem. The COG is in a separate python file. I think I put all code needed to understand the problem. Let me know if something is missing.
The text was updated successfully, but these errors were encountered: