statspost.client
¶
Module Contents¶
Classes¶
The client to post stats |
Attributes¶
Type hint for the supported Botlists |
|
List of Botlists supported |
- statspost.client.SUPPORTED_BOTLISTS¶
Type hint for the supported Botlists
- statspost.client.VALID_BOTLISTS :Iterable¶
List of Botlists supported - topgg - discordbotlist - bladelist - discordbotsgg - discordlabs - discord-botlist.eu - yabl - voidbots - radarbotdirectory - blist - botlist.me - discords - infinity - motiondevelopment - discordservices - vcodes - discordz - disforge - topicList
- class statspost.client.StatsPost(*args, **kwargs)[source]¶
Bases:
statspost.http.BaseHTTP
The client to post stats
- Raises:
ValueError – When one of the default values is missing
- botclass :Union[discord.Client, discord.AutoShardedClient, discord.ext.commands.Bot, discord.ext.commands.AutoShardedBot]¶
- botlist_data :Mapping[SUPPORTED_BOTLISTS, str]¶
- retry :bool = True¶
- retry_times :int = 10¶
- add_botlist(botlist, token)[source]¶
A helper function to add a botlist from the list of supported botliss
- Parameters:
botlist (SUPPORTED_BOTLISTS) – Botlist name
token (str) – The token provided by the botlist
- Return type:
None
- await post_stats(return_post_data: Optional[bool] = None) Dict [source]¶
- await post_stats(return_post_data=MISSING) None
Start posting stats from listed of provided botlist
- Parameters:
return_post_data (Optional[bool], optional) – The post data return by the botlist, defaults to False
- Raises:
NoBotListData – When this function is ran without providing botlist data to the client
- Returns:
The post data is returned is asked else None is returned.
- Return type:
Union[Dict, None]