Model Reference

This page will document every model that is returned, and used, by toppy.

Warning

These objects should not be manually created by users.

class toppy.models.Bot(id: int, username: str, discriminator: int, lib: str, prefix: str, shortdesc: str, tags: ~typing.List[str], owners: ~typing.List[int], date: ~datetime.datetime, certifiedBot: bool, points: int, monthlyPoints: int, donatebotguildid: str | None = None, guilds: ~typing.List[int] = <factory>, vanity: str | None = None, server_count: int | None = None, shard_count: int | None = None, invite: str | None = None, website: str | None = None, support: str | None = None, github: str | None = None, longdesc: str | None = None, avatar: str | None = None, defAvatar: str | None = None)

Represents a bot. This is used by the likes of search and find_one

See Also: https://docs.top.gg/docs/API/bot#bot-structure

id: int

The id of the bot

username: str

The username of the bot

discriminator: int

The discriminator of the bot

lib: str

The library of the bot

prefix: str

The prefix of the bot

shortdesc: str

The short description of the bot

tags: List[str]

The tags of the bot

owners: List[int]

Snowflakes of the owners of the bot. First one in the array is the main owner

date: datetime

The date when the bot was approved

certifiedBot: bool

The certified status of the bot

points: int

The amount of upvotes the bot has

monthlyPoints: int

The amount of upvotes the bot has this month

donatebotguildid: str | None = None

The guild id for the donatebot setup

guilds: List[int]

The guilds featured on the bot page

vanity: str | None = None

The vanity url of the bot

server_count: int | None = None

The amount of servers the bot has according to posted stats.

shard_count: int | None = None

The amount of shards the bot has according to posted stats.

invite: str | None = None

The custom bot invite url of the bot

website: str | None = None

The website url of the bot

support: str | None = None

The support server invite code of the bot

github: str | None = None

The link to the github repo of the bot

longdesc: str | None = None

The long description of the bot. Can contain HTML and/or Markdown

avatar: str | None = None

The avatar hash of the bot’s avatar

defAvatar: str | None = None

The cdn hash of the bot’s avatar if the bot has none

class toppy.models.User(id: int, username: str, discriminator: int, defAvatar: str, supporter: bool, certifiedDev: bool, mod: bool, webMod: bool, admin: bool, bio: str | None = None, banner: str | None = None, color: str | None = None, social: ~toppy.models.user.Social = <factory>)

Represents a single user on top.gg

See Also: https://docs.top.gg/docs/API/user#structure

id: int

The ID of the user

username: str

The username of the user

discriminator: int

The discriminator of the user

defAvatar: str

The cdn hash of the user’s avatar if the user has none

supporter: bool

The supporter status of the user

certifiedDev: bool

The certified developer status of the user

mod: bool

The moderation status of the user

webMod: bool

The web moderation status of the user

admin: bool

The admin status of the user

bio: str | None = None

The bio of the user

banner: str | None = None

The banner URL of the user

color: str | None = None

The custom hex color of the user (not guaranteed to be valid hex)

social: Social

The social usernames of the user