Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 35b864c

Browse files
♻️ improving Intents.all() method
Co-authored-by: CircuitSacul <[email protected]>
1 parent f98d6b6 commit 35b864c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

pincer/objects/app/intents.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,10 @@ class Intents(IntFlag):
6767
DIRECT_MESSAGE_REACTIONS = 1 << 13
6868
DIRECT_MESSAGE_TYPING = 1 << 14
6969

70-
@staticmethod
71-
def all() -> Intents:
70+
@classmethod
71+
def all(cls) -> Intents:
7272
"""
7373
:class:`~pincer.objects.app.intents.Intents`:
7474
Method of all intents
7575
"""
76-
res = 0
77-
78-
for intent in list(map(lambda itm: itm.value, Intents)):
79-
res |= intent
80-
81-
return Intents(res)
76+
return cls(sum(cls))

0 commit comments

Comments
 (0)