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