Skip to content

Restricted VC causes the bot to hang #2130

Open
@solaluset

Description

@solaluset

Summary

Bot hangs when trying to connect to restricted VC

Reproduction Steps

  1. Create a VC
  2. Forbid the bot to connect to it
  3. Run the connect command

Minimal Reproducible Code

import os

import discord


intents = discord.Intents.default()
intents.voice_states = True
bot = discord.Bot(intents=intents)


@bot.command()
async def connect(ctx):
    await ctx.author.voice.channel.connect()
    await ctx.respond("Connected")


bot.run(os.getenv("BOT_TOKEN"))

Expected Results

I'd expect a permission error raised

Actual Results

The execution hangs

Intents

default() + voice_states

System Information

  • Python v3.11.2-final
  • py-cord v2.4.1-final
  • aiohttp v3.8.4
  • system info: Linux 4.14.232-QuicksilveR™-ReloadedOS-Edition #1 SMP PREEMPT Wed May 26 07:08:17 UTC 2021

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

Metadata

Metadata

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions