Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: create_role, pass arguments as per payload #75

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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
Loading