Add GNU/ message handler
This commit is contained in:
parent
d959bf6fdd
commit
2e616ef008
9
bot.py
9
bot.py
|
|
@ -174,6 +174,15 @@ def msg_ping(match: Match[str]) -> Response:
|
||||||
return MessageResponse(match, f'PONG {esc(rest)}')
|
return MessageResponse(match, f'PONG {esc(rest)}')
|
||||||
|
|
||||||
|
|
||||||
|
@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:
|
||||||
|
return MessageResponse(match, f'YES! GNU/{esc(word)}')
|
||||||
|
else:
|
||||||
|
return MessageResponse(match, f"Um please, it's GNU/{esc(word)}!")
|
||||||
|
|
||||||
|
|
||||||
# TODO: !tags, only allowed by stream admin / mods????
|
# TODO: !tags, only allowed by stream admin / mods????
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue