diff options
Diffstat (limited to '')
| -rw-r--r-- | bot/__main__.py | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/bot/__main__.py b/bot/__main__.py index bacb2fdd..a6eb6d88 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -11,12 +11,14 @@ from redis import RedisError  import bot  from bot import constants  from bot.bot import Bot +from bot.command_error_handlers import bootstrap_command_error_manager  from bot.log import setup_sentry  from bot.utils.decorators import whitelist_check  log = get_logger(__name__)  setup_sentry() +  async def _create_redis_session() -> RedisSession:      """Create and connect to a redis session."""      redis_session = RedisSession( @@ -74,6 +76,8 @@ async def main() -> None:              allowed_roles=allowed_roles,          ) +        bot.instance.register_command_error_manager(bootstrap_command_error_manager(bot.instance)) +          async with bot.instance as _bot:              _bot.add_check(whitelist_check(                  channels=constants.WHITELISTED_CHANNELS, | 
