Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception in blacklist feature #164

Merged
merged 5 commits into from
Mar 25, 2024
Merged

Fix exception in blacklist feature #164

merged 5 commits into from
Mar 25, 2024

Conversation

TendTo
Copy link
Member

@TendTo TendTo commented Mar 24, 2024

Prerequisites

  • I have read and understood the contributing guide.
  • The commit message follows the conventional commits guidelines.
  • Tested the changes locally with a real Telegram bot.
  • I have updated the CHANGELOG.rst file with an overview of the changes made.

Description

Fix of the bug causing the following exception:

spotted.debug.log_manager - ERROR - Exception while handling an update:
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/telegram/ext/_application.py", line 1264, in process_update
    await coroutine
  File "/usr/local/lib/python3.12/site-packages/telegram/ext/_handlers/basehandler.py", line 157, in handle_update
    return await self.callback(update, context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/spotted/handlers/spam_comment.py", line 20, in spam_comment_msg
    if message in info.message.text:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

Does this PR introduce a breaking change?

  • Yes
  • No

Python version you are using

3.11.8

@TendTo TendTo requested a review from Helias March 24, 2024 22:47
@TendTo TendTo changed the title Main Fix exception in blacklist feature Mar 25, 2024
@Helias Helias merged commit 8aec13e into UNICT-DMI:main Mar 25, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants