MCPcopy
hub / github.com/Rapptz/discord.py / __init__

Method __init__

discord/flags.py:1472–1478  ·  view source on GitHub ↗
(self, **kwargs: Unpack[_MemberCacheFlagsKwargs])

Source from the content-addressed store, hash-verified

1470 __slots__ = ()
1471
1472 def __init__(self, **kwargs: Unpack[_MemberCacheFlagsKwargs]) -> None:
1473 bits = max(self.VALID_FLAGS.values()).bit_length()
1474 self.value: int = (1 << bits) - 1
1475 for key, value in kwargs.items():
1476 if key not in self.VALID_FLAGS:
1477 raise TypeError(f'{key!r} is not a valid flag name.')
1478 setattr(self, key, value)
1479
1480 @classmethod
1481 def all(cls: Type[MemberCacheFlags]) -> MemberCacheFlags:

Callers

nothing calls this directly

Calls 2

itemsMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected