Skip to content

Document the instance attributes of BotBase #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion pydis_core/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,20 @@ def __init__(self, base: 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,
Expand Down