add ignore case for gnu handle_message function

This commit is contained in:
Yoav Caspi 2019-09-07 22:41:22 +03:00
parent f65d15c08e
commit 3b6d0e6d21
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -297,7 +297,7 @@ def msg_ping(match: Match[str]) -> Response:
return MessageResponse(match, f'PONG {esc(rest)}')
@handle_message(r'.*\b(nano|linux|windows)\b')
@handle_message(r'.*\b(nano|linux|windows)\b', flags=re.IGNORECASE)
def msg_gnu_please(match: Match[str]) -> Response:
msg, word = match[3], match[4]
if f'GNU/{word}' in msg or f'gnu/{word}' in msg: