Skip to content

Commit

Permalink
fix: bridge command group name (#2000)
Browse files Browse the repository at this point in the history
* fix double name parameter

* Update CHANGELOG.md

Signed-off-by: Om <92863779+Om1609@users.noreply.github.com>

---------

Signed-off-by: Om <92863779+Om1609@users.noreply.github.com>
  • Loading branch information
OmLanke authored Apr 3, 2023
1 parent 4a5099a commit 279f616
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ These changes are available on the `master` branch, but have not yet been releas
in cogs. ([#1989](https://github.com/Pycord-Development/pycord/pull/1989))
- Fixed scheduled events breaking when changing the location from external to a channel.
([#1998](https://github.com/Pycord-Development/pycord/pull/1998))
- Fixed `TypeError` being raised when passing `name` argument to bridge groups.
([#2000](https://github.com/Pycord-Development/pycord/pull/2000))

## [2.4.1] - 2023-03-20

Expand Down
6 changes: 4 additions & 2 deletions discord/ext/bridge/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,12 @@ class BridgeCommandGroup(BridgeCommand):
slash_variant: BridgeSlashGroup

def __init__(self, callback, *args, **kwargs):
ext_var = BridgeExtGroup(callback, *args, **kwargs)
kwargs.update({"name": ext_var.name})
super().__init__(
callback,
ext_variant=(ext_var := BridgeExtGroup(callback, *args, **kwargs)),
slash_variant=BridgeSlashGroup(callback, ext_var.name, *args, **kwargs),
ext_variant=ext_var,
slash_variant=BridgeSlashGroup(callback, *args, **kwargs),
parent=kwargs.pop("parent", None),
)

Expand Down

0 comments on commit 279f616

Please sign in to comment.