-
Notifications
You must be signed in to change notification settings - Fork 2
Client
attribute name | attribute type | default value |
---|---|---|
id | int | |
username | str | |
discriminator | str | |
avatar_url | str | None |
default_avatar | str | |
avatar | str | avatar_url or default_avatar |
prefix | str | |
short_description | str | |
long_description | str | None |
tags | List[str] | [] |
website | str | None |
support | str | None |
github | str | None |
owners | List[int] | [] |
featured_guilds | List[int] | [] |
invite | str |
user(state = none)
Returns a discord.User object from self.id.
Unless you constructed this yourself (don't), it's usually safe to leave state
blank.
If for whatever reason you need to provide a state, make sure it has a get_user
attribute.
Returns discord.User
attribute name | attribute type | default value |
---|---|---|
id | int | |
username | str | |
discriminator | str | |
avatar_url | str | None |
default_avatar | str | |
avatar | str | avatar_url or default_avatar |
bio | str | None |
banner_url | str | None |
socials | WeakRef | |
colour | Colour | |
color | alias for self.colour | |
supporter | bool | False |
site_mod | bool | False |
site_admin | bool | False |
certified | bool | False |
user(state = none)
Returns a discord.User object from self.id.
Unless you constructed this yourself (don't), it's usually safe to leave state
blank.
If for whatever reason you need to provide a state, make sure it has a get_user
attribute.
Returns discord.User
attribute name | attribute type | default value |
---|---|---|
id | int | |
username | str | |
discriminator | str | #0000 |
avatar | str |
async fetch_bot(bot_id: int, *, fail_if_ratelimited: bool = False)
Fetches a bot from top.gg
- bot_id: The bot's client ID
- fail_if_ratelimited: Whether to raise an error if we get ratelimited or just wait an hour
Returns: A bot model
async fetch_bot(limit: int = 50, offset: int = 0, search: dict = None, sort: str = None, fail_if_ratelimited: bool = True)
Fetches up to <limit> bots. It's best you read top.gg's docs on this one.
- limit: Up to this many bots will be fetched.
- offset: just read top.gg's docs for this one
- search: Search options (e.g.
{"library": "discord.py"}
) - sort: gg's docs don't explain much to be honest
- fail_if_ratelimited: Whether to raise an error if we get ratelimited or just wait an hour
Returns: A list of bot objects.