From 6c768137ea5e441398e18edebe98d386bb688c3f Mon Sep 17 00:00:00 2001 From: MadCat9958 Date: Sun, 4 Jun 2023 12:54:05 +0300 Subject: [PATCH 1/4] Docs update (am i right?) --- docs/source/api/types.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/source/api/types.rst b/docs/source/api/types.rst index 3f4771d..2bb9136 100644 --- a/docs/source/api/types.rst +++ b/docs/source/api/types.rst @@ -30,6 +30,13 @@ Bots :members: +Servers +--------- + +.. autoclass:: ResourceServer + :members: + + Users ------ @@ -38,3 +45,6 @@ Users .. autoclass:: PartialUser :members: + +.. autoclass:: UserProfile + :members: From 11f5ca3fc7c23019597d796381486fc2aecf01fa Mon Sep 17 00:00:00 2001 From: MadCat9958 Date: Sun, 4 Jun 2023 12:55:38 +0300 Subject: [PATCH 2/4] =?UTF-8?q?=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/source/api/types.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/source/api/types.rst b/docs/source/api/types.rst index 2bb9136..c7cb70b 100644 --- a/docs/source/api/types.rst +++ b/docs/source/api/types.rst @@ -19,6 +19,9 @@ Enums .. autoclass:: BotTag :members: +.. autoclass:: ServerTag + :members: + .. autoclass:: ResourceStatus :members: From 51bc49689343b6383d45a2ef7d29782dbcda775f Mon Sep 17 00:00:00 2001 From: MadCat9958 Date: Sun, 4 Jun 2023 13:08:30 +0300 Subject: [PATCH 3/4] =?UTF-8?q?<@585766846268047370>,=20=D1=81=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boticordpy/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boticordpy/http.py b/boticordpy/http.py index a0f2776..77c82cc 100644 --- a/boticordpy/http.py +++ b/boticordpy/http.py @@ -42,7 +42,7 @@ class HttpClient: async with self.session.request(method, url, **kwargs) as response: data = await response.json() - if response.status == 200 or response.status == 201: + if (200, 201).__contains__(response.status): return data["result"] else: raise exceptions.HTTPException( From 388e8934407036a0115b2d3d17fa0ea3dacba0a3 Mon Sep 17 00:00:00 2001 From: MadCat9958 Date: Sun, 4 Jun 2023 13:09:58 +0300 Subject: [PATCH 4/4] Fix UserProfile args --- boticordpy/types.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boticordpy/types.py b/boticordpy/types.py index 48bf1b9..c10a442 100644 --- a/boticordpy/types.py +++ b/boticordpy/types.py @@ -688,6 +688,9 @@ class UserProfile(PartialUser): bots: List[ResourceBot] """User's bots list""" + servers: List[ResourceServer] + """User's servers list""" + @classmethod def from_dict(cls, data: dict): """Generate a UserProfile from the given data.