Add base -> colour support, and optimization in errors.py.

This commit is contained in:
privacy lulz
2021-09-01 19:36:37 +00:00
parent 6f5614373a
commit 10d8a03d71
2 changed files with 19 additions and 1 deletions

View File

@@ -110,7 +110,7 @@ class CommandError(DiscordException):
from :class:`.Bot`\, :func:`.on_command_error`.
"""
def __init__(self, message: Optional[str] = None, *args: Any) -> None:
if message is not None:
if message: # replace 'if not none' with 'if message'
# clean-up @everyone and @here mentions
m = message.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere')
super().__init__(m, *args)