!ping command added

This commit is contained in:
gpkvt 2022-08-12 10:19:00 +02:00
parent df9ce03f98
commit 776570dbbb
2 changed files with 7 additions and 0 deletions

View File

@ -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 <username>`: Disable TTS for the given user

4
tts.py
View File

@ -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()