From 776570dbbbd33780c76bf863f82feba90d528936 Mon Sep 17 00:00:00 2001 From: gpkvt Date: Fri, 12 Aug 2022 10:19:00 +0200 Subject: [PATCH] !ping command added --- README.md | 3 +++ tts.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 4246ecd..753c936 100644 --- a/README.md +++ b/README.md @@ -134,8 +134,11 @@ Execute `tts.exe` (or `tts.py` if you have Python installed), open the TTS webpa Connect to the configured Twitch channel and send a message starting with `!tts`. After a few seconds (depending on your `clearmsg_timeout` config), the message should be read. +### Additional Commands + Additional commands (broadcaster and mods only) are: + * `!ping`: Check if bot is alive (the bot should reply: `Pong!`) * `!toff`: Turn TTS off (will also empty the current TTS queue) * `!ton`: Turn TTS back on * `!dtts `: Disable TTS for the given user diff --git a/tts.py b/tts.py index f140bba..8ab5412 100644 --- a/tts.py +++ b/tts.py @@ -170,6 +170,10 @@ class IRC: return True + if msg.startswith('!ping'): + logging.debug('Ping check received.') + self.sendpriv(conf['IRC_CHANNEL'], "@"+str(user), "Pong!") + if msg.startswith('!ptts'): logging.debug("!ptts command detected") user = msg.replace('!ptts', '').strip().lower()