diff options
author | 2022-05-30 20:49:08 +0400 | |
---|---|---|
committer | 2022-05-30 20:49:08 +0400 | |
commit | e86b72520acb7afb96718417ecb5c4454187ed45 (patch) | |
tree | 0b2cd47d9d8b7b864074f12a598371bbfead20cd /botcore | |
parent | Merge pull request #78 from python-discord/bump-d.py (diff) | |
parent | Fix Entry In Changelog (diff) |
Merge pull request #1 from HassanAbouelela/upgrade-docs
Upgrade docs
Diffstat (limited to 'botcore')
-rw-r--r-- | botcore/_bot.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/botcore/_bot.py b/botcore/_bot.py index a36dba15..e9eba5c5 100644 --- a/botcore/_bot.py +++ b/botcore/_bot.py @@ -17,8 +17,10 @@ from botcore.utils.logging import get_logger try: from async_rediscache import RedisSession + REDIS_AVAILABLE = True except ImportError: - RedisSession = discord.utils._MissingSentinel + RedisSession = None + REDIS_AVAILABLE = False log = get_logger() @@ -70,7 +72,7 @@ class BotBase(commands.Bot): self.api_client = api_client self.statsd_url = statsd_url - if redis_session and RedisSession == discord.utils._MissingSentinel: + if redis_session and not REDIS_AVAILABLE: warnings.warn("redis_session kwarg passed, but async-rediscache not installed!") elif redis_session: self.redis_session = redis_session |