aboutsummaryrefslogtreecommitdiffstats
path: root/botcore/_bot.py
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2022-05-30 19:10:35 +0100
committerGravatar GitHub <[email protected]>2022-05-30 19:10:35 +0100
commit6659680429eec1dd0d45a6332a329a8b5e5a0d0b (patch)
treeb5b1c6133f8f56e4788d119c3c9378c670137054 /botcore/_bot.py
parentMerge pull request #78 from python-discord/bump-d.py (diff)
parentFix Bullet Points In Changelog (diff)
Merge pull request #79 from python-discord/upgrade-docsv7.1.1
Diffstat (limited to 'botcore/_bot.py')
-rw-r--r--botcore/_bot.py6
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