Merge pull request #11 from MadCat9958/v3

Docs update + fixes
This commit is contained in:
Виктор 2023-06-04 13:15:36 +03:00 committed by GitHub
commit f9c8b04428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View file

@ -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(

View file

@ -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.

View file

@ -19,6 +19,9 @@ Enums
.. autoclass:: BotTag
:members:
.. autoclass:: ServerTag
:members:
.. autoclass:: ResourceStatus
:members:
@ -30,6 +33,13 @@ Bots
:members:
Servers
---------
.. autoclass:: ResourceServer
:members:
Users
------
@ -38,3 +48,6 @@ Users
.. autoclass:: PartialUser
:members:
.. autoclass:: UserProfile
:members: