Skip to content

Commit

Permalink
fix: create_role
Browse files Browse the repository at this point in the history
  • Loading branch information
1Danish-00 committed Apr 12, 2024
1 parent eed960b commit 3787637
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions revolt/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,7 @@ async def create_role(self, name: str) -> Role:
The role that was just created
"""
payload = await self.state.http.create_role(self.id, name)

return Role(payload, name, self, self.state)
return Role(payload["role"], payload["id"], self, self.state)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.9)

Could not access item in TypedDict   "role" is not a defined key in "Role" (reportGeneralTypeIssues)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.9)

Argument type is unknown   Argument corresponds to parameter "data" in function "__init__" (reportUnknownArgumentType)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.9)

Could not access item in TypedDict   "id" is not a defined key in "Role" (reportGeneralTypeIssues)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.9)

Argument type is unknown   Argument corresponds to parameter "role_id" in function "__init__" (reportUnknownArgumentType)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.10)

Could not access item in TypedDict   "role" is not a defined key in "Role" (reportGeneralTypeIssues)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.10)

Argument type is unknown   Argument corresponds to parameter "data" in function "__init__" (reportUnknownArgumentType)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.10)

Could not access item in TypedDict   "id" is not a defined key in "Role" (reportGeneralTypeIssues)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.10)

Argument type is unknown   Argument corresponds to parameter "role_id" in function "__init__" (reportUnknownArgumentType)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.11)

Could not access item in TypedDict   "role" is not a defined key in "Role" (reportGeneralTypeIssues)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.11)

Argument type is unknown   Argument corresponds to parameter "data" in function "__init__" (reportUnknownArgumentType)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.11)

Could not access item in TypedDict   "id" is not a defined key in "Role" (reportGeneralTypeIssues)

Check failure on line 429 in revolt/server.py

View workflow job for this annotation

GitHub Actions / pyright-type-checking (3.11)

Argument type is unknown   Argument corresponds to parameter "role_id" in function "__init__" (reportUnknownArgumentType)

async def create_emoji(self, name: str, file: File, *, nsfw: bool = False) -> Emoji:
"""Creates an emoji
Expand Down

0 comments on commit 3787637

Please sign in to comment.