Skip to content

Commit

Permalink
Add "all" scopes for lazer client scope.
Browse files Browse the repository at this point in the history
  • Loading branch information
mayacopeland authored Aug 25, 2023
1 parent b0cf9e9 commit fbea61d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aiosu/models/scopes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class Scopes(IntFlag):
CHAT_WRITE = 1 << 6
CHAT_WRITE_MANAGE = 1 << 7
LAZER = 1 << 8 # unused, lazer endpoints are not planned for support

ALL = 1 << 9

def __flags__(self) -> list[Scopes]:
scopes_list = [scope for scope in Scopes if self & scope]
return scopes_list
Expand All @@ -52,6 +53,7 @@ def from_api_list(cls, scopes: list[str]) -> Scopes:
"chat.write": Scopes.CHAT_WRITE,
"chat.write_manage": Scopes.CHAT_WRITE_MANAGE,
"lazer": Scopes.LAZER,
"*": Scopes.ALL,
}
VALID_CLIENT_SCOPES = Scopes.PUBLIC | Scopes.DELEGATE
OWN_CLIENT_SCOPES = Scopes.CHAT_READ | Scopes.CHAT_WRITE | Scopes.CHAT_WRITE_MANAGE

0 comments on commit fbea61d

Please sign in to comment.