Merge pull request #9 from tati1206/patch-2

Bug fixed. GNU and gnu
This commit is contained in:
Anthony Sottile 2019-07-13 15:21:31 -07:00 committed by GitHub
commit 2327eb95cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -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)}!")