diff options
| -rw-r--r-- | botcore/_bot.py | 6 | ||||
| -rw-r--r-- | docs/changelog.rst | 2 | ||||
| -rw-r--r-- | pyproject.toml | 2 | 
3 files changed, 7 insertions, 3 deletions
| diff --git a/botcore/_bot.py b/botcore/_bot.py index ed31d624..a6362d0b 100644 --- a/botcore/_bot.py +++ b/botcore/_bot.py @@ -239,9 +239,11 @@ class BotBase(commands.Bot):              # here. Normally, this shouldn't happen.              await self.redis_session.connect() -        # Create dummy stats client first, in case `statsd_url` is unreachable within `_connect_statsd()` +        # Create dummy stats client first, in case `statsd_url` is unreachable or None          self.stats = AsyncStatsClient(loop, "127.0.0.1") -        self._connect_statsd(self.statsd_url, loop) +        if self.statsd_url: +            self._connect_statsd(self.statsd_url, loop) +          await self.stats.create_socket()          try: diff --git a/docs/changelog.rst b/docs/changelog.rst index 1ba60bd2..049a0f8a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,8 @@  Changelog  ========= +- :release:`7.2.1 <30th June 2022>` +- :bug:`96` Fix attempts to connect to ``BotBase.statsd_url`` when it is None.  - :bug:`91` Fix incorrect docstring for ``botcore.utils.member.handle_role_change``.  - :bug:`91` Pass missing self parameter to ``BotBase.ping_services``.  - :bug:`91` Add missing await to ``BotBase.ping_services`` in some cases. diff --git a/pyproject.toml b/pyproject.toml index ebf54f97..e2720d18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@  [tool.poetry]  name = "bot-core" -version = "7.2.0" +version = "7.2.1"  description = "Bot-Core provides the core functionality and utilities for the bots of the Python Discord community."  authors = ["Python Discord <[email protected]>"]  license = "MIT" | 
