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 set custom name for bridge group #1987

Closed
3 tasks done
solaluset opened this issue Mar 28, 2023 · 0 comments · Fixed by #2000
Closed
3 tasks done

Can't set custom name for bridge group #1987

solaluset opened this issue Mar 28, 2023 · 0 comments · Fixed by #2000
Labels
bug Something isn't working

Comments

@solaluset
Copy link
Contributor

Summary

@bridge_group(name="name") gives error

Reproduction Steps

Create bridge group with a name=

Minimal Reproducible Code

import discord
from discord.ext import bridge


bot = bridge.Bot()


@bot.bridge_group(name="test")
async def _test(ctx):
    await ctx.respond("aaa")

Expected Results

Command registration

Actual Results

Traceback (most recent call last):
  File "/data/data/com.termux/files/home/repro.py", line 8, in <module>
    @bot.bridge_group(name="test")
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/tests/lib/python3.11/site-packages/discord/ext/bridge/bot.py", line 103, in decorator
    result = bridge_group(**kwargs)(func)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/tests/lib/python3.11/site-packages/discord/ext/bridge/core.py", line 386, in decorator
    return BridgeCommandGroup(callback, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/tests/lib/python3.11/site-packages/discord/ext/bridge/core.py", line 321, in __init__
    slash_variant=BridgeSlashGroup(callback, ext_var.name, *args, **kwargs),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/tests/lib/python3.11/site-packages/discord/ext/bridge/core.py", line 105, in __init__
    super().__init__(*args, **kwargs)
TypeError: SlashCommandGroup.__init__() got multiple values for argument 'name'

Intents

None

System Information

  • Python v3.11.1-final
  • py-cord v2.4.1-final
  • aiohttp v3.8.3
  • system info: Linux 4.14.190-perf-gc61d39ef577d-dirty # 2 SMP PREEMPT Sun May 29 00:58:57 CST 2022

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

It was fixed but got broken again, see #1628

@solaluset solaluset added the unconfirmed bug A bug report that needs triaging label Mar 28, 2023
@Middledot Middledot self-assigned this Apr 2, 2023
@Middledot Middledot removed their assignment Apr 3, 2023
@Middledot Middledot added bug Something isn't working and removed unconfirmed bug A bug report that needs triaging labels Apr 3, 2023
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