Allow creating an Intent through a passed integer value

This commit is contained in:
Rapptz 2022-04-29 10:50:22 -04:00
parent 9e3375f3fc
commit ef20264b1c

View File

@ -505,8 +505,8 @@ class Intents(BaseFlags):
__slots__ = ()
def __init__(self, **kwargs: bool) -> None:
self.value: int = self.DEFAULT_VALUE
def __init__(self, value: int = 0, **kwargs: bool) -> None:
self.value: int = value
for key, value in kwargs.items():
if key not in self.VALID_FLAGS:
raise TypeError(f'{key!r} is not a valid flag name.')