From f2700a96e1d4410efdb320894bf87841a6d621b5 Mon Sep 17 00:00:00 2001 From: Soheab_ <33902984+Soheab@users.noreply.github.com> Date: Sat, 17 May 2025 17:25:09 +0200 Subject: [PATCH] flags: MemberCacheFlags --- discord/flags.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/discord/flags.py b/discord/flags.py index 7a841a216..f3c57ba29 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -79,6 +79,10 @@ if TYPE_CHECKING: guild_polls: NotRequired[bool] dm_polls: NotRequired[bool] + class _MemberCacheFlagsKwargs(TypedDict): + voice: NotRequired[bool] + joined: NotRequired[bool] + __all__ = ( 'SystemChannelFlags', @@ -1447,7 +1451,7 @@ class MemberCacheFlags(BaseFlags): __slots__ = () - def __init__(self, **kwargs: bool): + def __init__(self, **kwargs: Unpack[_MemberCacheFlagsKwargs]) -> None: bits = max(self.VALID_FLAGS.values()).bit_length() self.value: int = (1 << bits) - 1 for key, value in kwargs.items():