From ece8ba600453bbdaf85ee09682301718251aed09 Mon Sep 17 00:00:00 2001 From: tati1206 <45135760+tati1206@users.noreply.github.com> Date: Sat, 13 Jul 2019 19:15:47 -0300 Subject: [PATCH] Bug fixed. GNU and gnu When "gnu /" was placed the bot responded as if it had not written gnu. I added an or in the if of line 194 to include the word gnu --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 2d9d382..7a36fb8 100644 --- a/bot.py +++ b/bot.py @@ -191,7 +191,7 @@ def msg_ping(match: Match[str]) -> Response: @handle_message(r'.*\b(nano|linux|windows)\b') def msg_gnu_please(match: Match[str]) -> Response: msg, word = match[3], match[4] - if f'GNU/{word}' in msg: + if f'GNU/{word}' in msg or f'gnu/{word}' in msg: return MessageResponse(match, f'YES! GNU/{esc(word)}') else: return MessageResponse(match, f"Um please, it's GNU/{esc(word)}!")