mirror of
https://github.com/boticord/boticordpy.git
synced 2024-09-22 19:32:01 +03:00
updated docs && changed version
This commit is contained in:
parent
4abdef29a3
commit
94e9e5cdbe
7 changed files with 17 additions and 5 deletions
|
@ -4,5 +4,9 @@ These are the open source libraries we use:
|
|||
- sphinx (https://github.com/sphinx-doc/sphinx)
|
||||
- furo (https://github.com/pradyunsg/furo)
|
||||
|
||||
These are users who have made a meaningful contribution to the development of the project:
|
||||
- mxdcxt (One of the developers of the v3 module update)
|
||||
- arslee07 (Updated logo of the project)
|
||||
|
||||
It is also important to note that some developments of Melisa (https://github.com/MelisaDev/melisa) were used in the development of the project.
|
||||
I would also like to express my gratitude to the former admin staff of the BotiCord (until 06/02/2023) and the entire project community.
|
|
@ -56,7 +56,7 @@ bot = commands.Bot(command_prefix="!")
|
|||
|
||||
# Function that will return the current bot's stats.
|
||||
async def get_stats():
|
||||
return {"servers": len(bot.guilds), "shards": 0, "members": len(bot.users)}
|
||||
return {"servers": len(bot.guilds), "shards": None, "members": len(bot.users)}
|
||||
|
||||
|
||||
# Function that will be called if stats are posted successfully.
|
||||
|
|
|
@ -10,7 +10,7 @@ __title__ = "boticordpy"
|
|||
__author__ = "Marakarka"
|
||||
__license__ = "MIT"
|
||||
__copyright__ = "Copyright 2021 - 2023 Marakarka"
|
||||
__version__ = "3.0.1"
|
||||
__version__ = "3.0.2"
|
||||
|
||||
from .client import BoticordClient
|
||||
from .types import *
|
||||
|
|
|
@ -9,7 +9,7 @@ _logger = logging.getLogger("boticord.autopost")
|
|||
|
||||
class AutoPost:
|
||||
"""
|
||||
You can use this class to post stats automatically.
|
||||
You can use this to post stats automatically.
|
||||
|
||||
Args:
|
||||
client (:obj:`~.client.BoticordClient`)
|
||||
|
@ -109,6 +109,10 @@ class AutoPost:
|
|||
"""
|
||||
Registers a function that will return stats. Registered Function Must return dictionary.
|
||||
|
||||
.. warning::
|
||||
|
||||
None of the values must be equal to 0. Specify None instead of 0.
|
||||
|
||||
.. warning::
|
||||
|
||||
Callback functions must be a **coroutine**. If they aren't, then you might get unexpected
|
||||
|
|
|
@ -60,6 +60,10 @@ class BoticordClient:
|
|||
) -> boticord_types.ResourceBot:
|
||||
"""Post Bot's stats.
|
||||
|
||||
.. warning::
|
||||
|
||||
None of the values must be equal to 0. Specify None instead of 0.
|
||||
|
||||
Args:
|
||||
bot_id (Union[:obj:`str`, :obj:`int`])
|
||||
Id of the bot to post stats of.
|
||||
|
|
|
@ -27,7 +27,7 @@ copyright = "2021 - 2023, Viktor K (Marakarka)"
|
|||
author = "Viktor K (Marakarka)"
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = "3.0.1"
|
||||
release = "3.0.2"
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
|
|
@ -10,7 +10,7 @@ bot = commands.Bot(command_prefix="!")
|
|||
|
||||
# Function that will return the current bot's stats.
|
||||
async def get_stats():
|
||||
return {"servers": len(bot.guilds), "shards": 0, "members": len(bot.users)}
|
||||
return {"servers": len(bot.guilds), "shards": None, "members": len(bot.users)}
|
||||
|
||||
|
||||
# Function that will be called if stats are posted successfully.
|
||||
|
|
Loading…
Reference in a new issue