oop
This commit is contained in:
parent
f96a537b8f
commit
ecd898e62c
@ -408,14 +408,10 @@ class Intents(BaseFlags):
|
||||
if item not in cls.VALID_FLAGS.keys():
|
||||
intents_list.remove(item)
|
||||
|
||||
items = {}
|
||||
self = cls.none()
|
||||
for item in intents_list:
|
||||
items[item] = cls.VALID_FLAGS[item]
|
||||
setattr(self, item, True)
|
||||
|
||||
bits = max(items.values()).bit_length()
|
||||
value = (1 << bits) - 1
|
||||
self = cls.__new__(cls)
|
||||
self.value = value
|
||||
return self
|
||||
|
||||
@classmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user