-
-
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
voice.connect() never returns #9460
Comments
Have you checked if you have permissions to connect to the channel |
yes, it has all the necessary permits |
I'm not seeing it in the code |
bot has administrator permissions, the problem does not always persist, sometimes everything works correctly |
People frequently say this and then they check and it isn't true, that's why it's better to have the permission checks in the code. Anyway, turn on debug logging and check the logs and see if anything pops up. Though it can get pretty spammy. This isn't reproducible as far as I'm aware outside of the scenario I mentioned with permissions. |
I have already tried my hand at checking debug logs and anything that could give me information, but I never find anything, nothing is sent, it just hangs. If it were a permissions problem it would never have worked, but instead sometimes it works and sometimes it doesn't. |
Then as it stands this issue is unfortunately not actionable. If there's new information or something that can point to something more actionable you are free to open a new issue. |
@yosaki0 any updates on this? I'm having the same issue |
This should be fixed with #9525. |
With latest master I'm now seeing this behaviour. Attempting to call class MinimalExample(commands.Cog):
@commands.Cog.listener()
async def on_voice_state_update(self, member, before, after):
vc = member.guild.voice_client
if not vc and after.channel:
await self._connect(after.channel)
async def _connect(self, channel):
if channel.guild.voice_client is None:
vc = await channel.connect()
print(vc) # Never executes |
@codeofdusk I can't reproduce this. If this is consistent behavior for you, you should make a new issue with debug log output included. |
@imayhaveborkedit I've opened #9634. |
Summary
once the connect function is called the bot connects to the voice channel but the never returns, this blocks the code and is_connected returns false
Reproduction Steps
Minimal Reproducible Code
Expected Results
await channel.connect(self_deaf=True) # return
print("connected") # executed
Actual Results
await channel.connect(self_deaf=True) # never return
print("connected") # not executed
Intents
intents = discord.Intents.default(); intents.message_content = True
System Information
Checklist
Additional Context
this problem is not always present, sometimes everything works correctly
The text was updated successfully, but these errors were encountered: