aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar shtlrs <[email protected]>2024-02-18 11:34:01 +0100
committerGravatar shtlrs <[email protected]>2024-02-18 11:34:01 +0100
commitb0b758e95eda7e44451abd1b782644ff5d9e03a3 (patch)
tree89a7403303ed712461af6f60a417c2db06ee5faf
parentbump version to 1.7.0 in pyproject.toml (#203) (diff)
document the instance attributes of BotBase
-rw-r--r--docs/changelog.rst2
-rw-r--r--pydis_core/_bot.py15
2 files changed, 16 insertions, 1 deletions
diff --git a/docs/changelog.rst b/docs/changelog.rst
index ff4cd010..b3e5d9a3 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -4,6 +4,8 @@
Changelog
=========
+- :support:`204` Document the instance attributes of :obj:`pydis_core.BotBase`.
+
- :release:`10.7.0 <30th January 2024>`
- :feature:`158` Add locking utilities for controlling concurrency logic
- :support:`202` Bump various development dependencies and CI workflow action versions
diff --git a/pydis_core/_bot.py b/pydis_core/_bot.py
index 2c876d69..56cedb28 100644
--- a/pydis_core/_bot.py
+++ b/pydis_core/_bot.py
@@ -33,7 +33,20 @@ class StartupError(Exception):
class BotBase(commands.Bot):
- """A sub-class that implements many common features that Python Discord bots use."""
+ """
+ A sub-class that implements many common features that Python Discord bots use.
+
+ Attributes:
+ guild_id (int): ID of the guild that the bot belongs to.
+ http_session (aiohttp.ClientSession): The http session used for sending out HTTP requests.
+ api_client (pydis_core.site_api.APIClient): The API client used for communications with the site service.
+ statsd_url (str): The url that statsd sends metrics to.
+ redis_session (async_rediscache.RedisSession): The redis session used to communicate with the Redis instance.
+ stats (pydis_core.async_stats.AsyncStatsClient): The statsd client that sends metrics.
+ all_extensions (frozenset[str]): All extensions that were found within the ``module`` passed to
+ ``self.load_extensions``. Use ``self.extensions`` to get the loaded extensions.
+
+ """
def __init__(
self,