Skip to content
eek#7574 edited this page Mar 16, 2021 · 15 revisions

Models

Bot

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

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

SimpleUser

attribute name attribute type default value
id int
username str
discriminator str #0000
avatar str

Functions

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.

Clone this wiki locally