dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
665 stars 155 forks source link

voice.connect() blocks the code #481

Closed Showdown76py closed 1 year ago

Showdown76py commented 1 year ago

Summary

When using discord.GroupChannel.connect(), it does connect but it just blocks

Reproduction Steps

Make the bot start a call/join the call in a GroupChannel using discord.GroupChannel.connect()

Code

vc = None
@bot.command(brief='Connect to VC')
async def connect(ctx):
    global vc
    voice:discord.GroupChannel = ctx.channel
    try:
        print('connecting')   # this will print
        vc = await voice.connect()  # the bot connects
        print("vc returned a", type(vc))  # doesn't print

Expected Results

the vc variable should be a VoiceProtocol

Actual Results

When using discord.GroupChannel.connect(), it gets stuck there. (no traceback)

System Information

- Python v3.8.10-final
- discord.py-self v2.0.0-alpha
    - discord.py-self pkg_resources: v2.0.0a2
- aiohttp v3.7.4.post0
- system info: Linux 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022

Checklist

Additional Information

No response Note: I have all the required libraries that are installed with discord.py-self[voice]

dolfies commented 1 year ago

According to your system information, you seem to be on a fairly old master commit. Try updating.

Showdown76py commented 1 year ago

Hello, If you're talking about the discord.py-self module, it's on v2.0.0-alpha - the development version.

# python3 -m pip freeze | grep cord
discord-protos==0.0.2
discord.py-self @ git+https://github.com/dolfies/discord.py-self.git@bb8c4a726bd247a20cade1e8fdc619266f7158aa

If it's about the Ubuntu installed, I updated it and it didn't solve the issue.

dolfies commented 1 year ago

You're on an old commit of the development version. Update by reinstalling from git like on the readme: pip install git+https://github.com/dolfies/discord.py-self@master#egg=discord.py-self[voice,speed] -U

Showdown76py commented 1 year ago

I found the issue, it was because I had a very old clone of the repo in a folder, and it was importing it instead. Thanks!