diff --git a/bubbles/commands/debug.py b/bubbles/commands/debug.py index 4d990e8..ecd9574 100644 --- a/bubbles/commands/debug.py +++ b/bubbles/commands/debug.py @@ -11,4 +11,4 @@ def debug(payload: dict) -> None: transcription_check_ping_callback() -PLUGIN = Plugin(callable=debug, regex=r"^debug", ignore_prefix=True) +PLUGIN = Plugin(callable=debug, regex=r"^debug") diff --git a/bubbles/commands/periodic/transcription_check_ping.py b/bubbles/commands/periodic/transcription_check_ping.py index b57fd0a..20d69d2 100644 --- a/bubbles/commands/periodic/transcription_check_ping.py +++ b/bubbles/commands/periodic/transcription_check_ping.py @@ -99,8 +99,11 @@ def _get_check_username(message: Dict) -> Optional[str]: :returns: The username, or None if it couldn't be found. """ text = _extract_check_text(message) - username_match = USERNAME_REGEX.search(text) - return username_match.group("username") if username_match else None + try: + username_match = USERNAME_REGEX.search(text) + return username_match.group("username") if username_match else None + except TypeError: + print(f"Could not parse username. Value of `text`: {text}") def _get_check_status(message: Dict) -> Tuple[CheckStatus, Optional[str]]: