Skip to content
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

Can't create bridge group in a cog #1629

Closed
3 tasks done
solaluset opened this issue Sep 10, 2022 · 0 comments · Fixed by #1633
Closed
3 tasks done

Can't create bridge group in a cog #1629

solaluset opened this issue Sep 10, 2022 · 0 comments · Fixed by #1633
Labels
bug Something isn't working

Comments

@solaluset
Copy link
Contributor

Summary

Cog with bridge group throws error

Reproduction Steps

Create bridge group inside a cog

Minimal Reproducible Code

class TestCog(commands.Cog):
    @bridge.bridge_group()
    async def test(self, ctx):
        await ctx.respond("ok")

Expected Results

Cog creation

Actual Results

Traceback (most recent call last):
  File "D:\coding\DandelionMusic\run.py", line 36, in <module>
    class TestCog(commands.Cog):
  File "D:\coding\dandelion_env\lib\site-packages\discord\cog.py", line 238, in __new__
    new_cls.__cog_commands__ = tuple(c._update_copy(cmd_attrs) for c in new_cls.__cog_commands__)  # type: ignore
  File "D:\coding\dandelion_env\lib\site-packages\discord\cog.py", line 238, in <genexpr>
    new_cls.__cog_commands__ = tuple(c._update_copy(cmd_attrs) for c in new_cls.__cog_commands__)  # type: ignore
  File "D:\coding\dandelion_env\lib\site-packages\discord\commands\core.py", line 1262, in _update_copy
    return self.copy()
  File "D:\coding\dandelion_env\lib\site-packages\discord\commands\core.py", line 1230, in copy
    ret = self.__class__(
TypeError: __init__() missing 1 required positional argument: 'callback'

Intents

default + message_content

System Information

  • Python v3.9.9-final
  • py-cord v2.1.3-final
  • aiohttp v3.8.1
  • system info: Windows 10 10.0.17763

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

@solaluset solaluset added the unconfirmed bug A bug report that needs triaging label Sep 10, 2022
@Middledot Middledot added bug Something isn't working and removed unconfirmed bug A bug report that needs triaging labels Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants