disnake icon indicating copy to clipboard operation
disnake copied to clipboard

3.10 uniontype is not supported within commands.Greedy

Open onerandomusername opened this issue 2 months ago • 0 comments

Summary

title

Reproduction Steps

commands.Greedy[disnake.Member | disnake.Object]

Minimal Reproducible Code


Expected Results

Work as if it was a Union

Actual Results


│                                                                                                  │
│ /home/qt/projects/monty-python/monty/exts/core/bot_features.py:624 in FeatureManagement          │
│                                                                                                  │
│   621 │   async def cmd_guild_add(                                                               │
│   622 │   │   self,                                                                              │
│   623 │   │   ctx: commands.Context,                                                             │
│ ❱ 624 │   │   │   guilds: commands.Greedy[disnake.Guild | disnake.Object] = None,  # type:       │
│       ignore                                                                                     │
│   625 │   │   *names: MaybeFeature,                                                              │
│   626 │   ) -> None:                                                                             │
│   627 │   │   """Add the features to the provided guilds, defaulting to the local guild."""      │
│                                                                                                  │
│ ╭──────────────────────────────── locals ────────────────────────────────╮                       │
│ │ cmd_features = <monty.monkey_patches.Group object at 0x7f9f3b901540>   │                       │
│ │    cmd_guild = <monty.monkey_patches.Command object at 0x7f9f3b901ba0> │                       │
│ │     features = <property object at 0x7f9f3b8ff830>                     │                       │
│ ╰────────────────────────────────────────────────────────────────────────╯                       │
│                                                                                                  │
│ /home/qt/projects/monty-python/.venv/lib/python3.10/site-packages/disnake/ext/commands/converter │
│ .py:1198 in __class_getitem__                                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Greedy[...] expects a type or a Converter instance.

Intents

0

System Information

- Python v3.10.18-final
- disnake v2.12.0-alpha
    - disnake importlib.metadata: v2.12.0a4825+g0ee7ec43
- aiohttp v3.12.15
- system info: Linux 6.16.9-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 25 18:05:50 UTC 2025 x86_64

Checklist

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

Additional Context

No response

onerandomusername avatar Oct 06 '25 18:10 onerandomusername