Loading repository dataβ¦
Loading repository dataβ¦
awersli99 / repository
π An unofficial asynchronous python wrapper for the discord.bio API.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
An unofficial asynchronous Python wrapper for the discord.bio api.
pip install pydiscordbio
This will be used to make requests to the API
from pydiscordbio import Client
client = Client()
| Error | Description |
|---|---|
| pydiscordbio.exceptions.APIError | Raised when the request to the API itself fails |
| pydiscordbio.exceptions.NotFound | Raised when the request to the API returns status code 404 |
| pydiscordbio.exceptions.UserNotFound | Raised when a user doesn't exist in the API |
| pydiscordbio.exceptions.InvalidSearch | Raised when a search query is invalid |
All methods of Client are typed meaning your IDE should auto complete the attributes
user = await client.user("wa")
#or
user = await client.user(738128655145762949)
description = (await client.user("wa")).details.description
banner_url = (await client.user("wa")).details.banner
description = (await client.user("wa")).discord.id
banner_url = (await client.user("wa")).discord.username
website = (await client.user("wa")).connections.website
# Discord connections
discord_connections = (await client.user("wa")).connections.discord
# Returns a list of DiscordConnection objects
top_users = await client.top()
# Returns a list of PartialUser objects from the top liked profiles
result = await client.search('Adam')
# Returns a list of PartialUser objects from the query
details: User
discord: Discord
connections: UserConnections
slug: str
user_id: int
flags: int
verified: bool
premium_type: int
created_at: datetime
description: str
location: str
gender: Optional[str]
birthday: Optional[datetime]
email: Optional[str]
occupation: Optional[str]
banner: Optional[str]
premium: bool
staff: bool
likes: int
id: int
username: str
full_username: str
avatar: Optional[str]
avatar_url: str
is_avatar_animated: bool
discriminator: str
flags: int
website: Optional[str]
instagram: Optional[str]
snapchat: Optional[str]
linkedin: Optional[str]
discord: List[DiscordConnection]
slug: str
verified: bool
staff: bool
premium: bool
likes: int
description: Optional[str]
discord: Discord
connection_type: str
name: str
id: str