Fix error message regex pattern

This commit is contained in:
ekzyis 2022-04-21 23:12:24 +02:00
parent 5ef9de8ebc
commit 7f7d1e05fc
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class ErrorMessage(BotMessage):
if command_name:
title = f'Error during command "{command_name}"'
description = None
if match := re.search(r'(?P<error>\w+Error): ?(ERROR: ?)?(?P<message>.*): ?Traceback', message):
if match := re.search(r'(?P<error>\w+Error): ?(ERROR: ?)?(?P<message>.*)(: ?Traceback)?', message):
description = f"{match.group('error')}: {match.group('message')}"
super().__init__(
title=title,