Fix the gnu+thing patch
This commit is contained in:
parent
d5e3738eed
commit
8aa6c71184
4
bot.py
4
bot.py
|
|
@ -320,9 +320,9 @@ def msg_ping(match: Match[str]) -> Response:
|
||||||
@handle_message(r'.*\b(nano|linux|windows|emacs)\b', flags=re.IGNORECASE)
|
@handle_message(r'.*\b(nano|linux|windows|emacs)\b', flags=re.IGNORECASE)
|
||||||
def msg_gnu_please(match: Match[str]) -> Response:
|
def msg_gnu_please(match: Match[str]) -> Response:
|
||||||
msg, word = match[3], match[4]
|
msg, word = match[3], match[4]
|
||||||
query = re.match(fr'gnu[/+]{word}', msg, flags=re.IGNORECASE)
|
query = re.match(f'gnu[/+]{word}', msg, flags=re.IGNORECASE)
|
||||||
if query:
|
if query:
|
||||||
return MessageResponse(match, f'YES! {query.match(0)}')
|
return MessageResponse(match, f'YES! {query[0]}')
|
||||||
else:
|
else:
|
||||||
return MessageResponse(match, f"Um please, it's GNU/{esc(word)}!")
|
return MessageResponse(match, f"Um please, it's GNU/{esc(word)}!")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue