Python Forum
Why does 'if' block run twice
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why does 'if' block run twice
#2
My first thought might be that
message['content']
contains two results for pattern1, where pattern2 does not. And for all i know bot_handler.send_reply and bot_handler.react could be interpreting it incorrectly. You are sending message to them but regex'ing message['content'] not message.

What is all of message in both cases? Because i know in IRC a message is a lot more content than just what the person wrote. These have to be parsed out. On rare occurrence if it is not parsed out properly, you can have a duplicate or false positive.
Recommended Tutorials:
Reply


Messages In This Thread
Why does 'if' block run twice - by laanan - Dec-13-2020, 10:43 PM
RE: Why does 'if' block run twice - by metulburr - Dec-14-2020, 01:52 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020