mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
Allow creating an Intent through a passed integer value
This commit is contained in:
parent
9e3375f3fc
commit
ef20264b1c
@ -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.')
|
||||
|
Loading…
x
Reference in New Issue
Block a user