79580442

Date: 2025-04-18 04:58:14
Score: 0.5
Natty:
Report link

The error is in the following line:

elif message.text.lower() == 'hello' or 'hi':

This statement is always true as @Klaus has pointed out. This is coz message.text.lower() == 'hello' and 'hi' are two separate conditions. The second one(‘hi’) is always true since it’s just a string and the Boolean value of a non-empty string in Python is True. To make the statement work, change the aforementioned line to:

elif message.text.lower() == 'hello' or message.text.lower() == 'hi':
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Klaus
Posted by: Dinux