From b27c689e437f7b6080d2e44c86822268c193fe52 Mon Sep 17 00:00:00 2001 From: Soheab_ <33902984+Soheab@users.noreply.github.com> Date: Wed, 27 Aug 2025 17:55:50 +0200 Subject: [PATCH] Allow extra kwargs for commands.Cog Requires pyright version 1.1.403+ --- discord/ext/commands/cog.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index 371a9f8c1..55e70fdb8 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -45,13 +45,12 @@ from typing import ( Tuple, TypeVar, Union, - TypedDict, ) from ._types import _BaseCommand, BotT if TYPE_CHECKING: - from typing_extensions import Self, Unpack + from typing_extensions import Self, Unpack, TypedDict from discord.abc import Snowflake from discord._types import ClientT @@ -59,7 +58,7 @@ if TYPE_CHECKING: from .context import Context from .core import Command, _CommandDecoratorKwargs - class _CogKwargs(TypedDict, total=False): + class _CogKwargs(TypedDict, total=False, extra_items=Any): name: str group_name: Union[str, app_commands.locale_str] description: str