mirror of
				https://gitlab.com/gpvkt/twitchtts.git
				synced 2025-10-31 17:17:35 +01:00 
			
		
		
		
	!ping command added
This commit is contained in:
		
							parent
							
								
									abe77da9d5
								
							
						
					
					
						commit
						172795fabe
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		|  | @ -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. | 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: | 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) |   * `!toff`: Turn TTS off (will also empty the current TTS queue) | ||||||
|   * `!ton`: Turn TTS back on |   * `!ton`: Turn TTS back on | ||||||
|   * `!dtts <username>`: Disable TTS for the given user |   * `!dtts <username>`: Disable TTS for the given user | ||||||
|  |  | ||||||
							
								
								
									
										4
									
								
								tts.py
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								tts.py
									
										
									
									
									
								
							|  | @ -170,6 +170,10 @@ class IRC: | ||||||
| 
 | 
 | ||||||
|                     return True |                     return True | ||||||
| 
 | 
 | ||||||
|  |                 if msg.startswith('!ping'): | ||||||
|  |                     logging.debug('Ping check received.') | ||||||
|  |                     self.sendpriv(conf['IRC_CHANNEL'], "@"+str(user), "Pong!") | ||||||
|  | 
 | ||||||
|                 if msg.startswith('!ptts'): |                 if msg.startswith('!ptts'): | ||||||
|                     logging.debug("!ptts command detected") |                     logging.debug("!ptts command detected") | ||||||
|                     user = msg.replace('!ptts', '').strip().lower() |                     user = msg.replace('!ptts', '').strip().lower() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue