Skip to content

Commit b0b758e

Browse files
committed
document the instance attributes of BotBase
1 parent 1546d7b commit b0b758e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

docs/changelog.rst

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Changelog
55
=========
66

7+
- :support:`204` Document the instance attributes of :obj:`pydis_core.BotBase`.
8+
79
- :release:`10.7.0 <30th January 2024>`
810
- :feature:`158` Add locking utilities for controlling concurrency logic
911
- :support:`202` Bump various development dependencies and CI workflow action versions

pydis_core/_bot.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,20 @@ def __init__(self, base: Exception):
3333

3434

3535
class BotBase(commands.Bot):
36-
"""A sub-class that implements many common features that Python Discord bots use."""
36+
"""
37+
A sub-class that implements many common features that Python Discord bots use.
38+
39+
Attributes:
40+
guild_id (int): ID of the guild that the bot belongs to.
41+
http_session (aiohttp.ClientSession): The http session used for sending out HTTP requests.
42+
api_client (pydis_core.site_api.APIClient): The API client used for communications with the site service.
43+
statsd_url (str): The url that statsd sends metrics to.
44+
redis_session (async_rediscache.RedisSession): The redis session used to communicate with the Redis instance.
45+
stats (pydis_core.async_stats.AsyncStatsClient): The statsd client that sends metrics.
46+
all_extensions (frozenset[str]): All extensions that were found within the ``module`` passed to
47+
``self.load_extensions``. Use ``self.extensions`` to get the loaded extensions.
48+
49+
"""
3750

3851
def __init__(
3952
self,

0 commit comments

Comments
 (0)