mirror of
				https://gitlab.com/gpvkt/twitchtts.git
				synced 2025-10-31 00:57:35 +01:00 
			
		
		
		
	Merge branch 'main' of gitlab.com:gpvkt/twitchtts
This commit is contained in:
		
						commit
						8a8272e2ba
					
				
					 2 changed files with 27 additions and 32 deletions
				
			
		|  | @ -1,6 +1,12 @@ | ||||||
| # Change Log | # Change Log | ||||||
| 
 | 
 | ||||||
| All notable changes to this project will be documented in this file. If there is a `Changed` section please read carefully, as this often means that you will need to adapt your `config.yml`, otherwise the bot might fail to start. | All notable changes to this project will be documented in this file. If there is a `Changed` section please read carefully, as this often means that you will need to adapt your `config.yml`. | ||||||
|  | 
 | ||||||
|  | ## [1.7.1] - 2022-10-02 | ||||||
|  | 
 | ||||||
|  | ### Fixed 1.7.1 | ||||||
|  | 
 | ||||||
|  | * Allow usage of `!sq` command when TTS is disabled | ||||||
| 
 | 
 | ||||||
| ## [1.7.0] - 2022-08-27 | ## [1.7.0] - 2022-08-27 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										51
									
								
								tts.py
									
										
									
									
									
								
							
							
						
						
									
										51
									
								
								tts.py
									
										
									
									
									
								
							|  | @ -764,38 +764,27 @@ class IRC: | ||||||
|         if not isinstance(quote, str): |         if not isinstance(quote, str): | ||||||
|             quote = quote.decode('utf-8') |             quote = quote.decode('utf-8') | ||||||
| 
 | 
 | ||||||
|         if IRC.check_tts_disabled(self, user): |         logging.info('Sending quote to TTS') | ||||||
|             logging.info('TTS is disabled') |         logging.debug("Quote: %s", quote) | ||||||
|         elif IRC.check_user_denied(self, user): |         self.sendmsg( | ||||||
|             logging.info('User is not allowed to use TTS') |             CONF['IRC_CHANNEL'], | ||||||
|         elif IRC.check_subonly(self, tags): |             "", | ||||||
|             logging.info('TTS is sub-only') |             quote | ||||||
|         elif IRC.check_modonly(self, tags): |         ) | ||||||
|             logging.info('TTS is mod-only') |  | ||||||
|         elif IRC.check_whitelist(self, user): |  | ||||||
|             logging.info('User is not on whitelist') |  | ||||||
|         else: |  | ||||||
|             logging.info('Sending quote to TTS') |  | ||||||
|             logging.debug("Quote: %s", quote) |  | ||||||
|             self.sendmsg( |  | ||||||
|                 CONF['IRC_CHANNEL'], |  | ||||||
|                 "", |  | ||||||
|                 quote |  | ||||||
|             ) |  | ||||||
| 
 | 
 | ||||||
|             message = quote.rsplit('(', 1)[0] |         message = quote.rsplit('(', 1)[0] | ||||||
|             raw_msg = { |         raw_msg = { | ||||||
|                 "TTS": True, |             "TTS": True, | ||||||
|                 "msg": message, |             "msg": message, | ||||||
|                 "badges": True, |             "badges": True, | ||||||
|                 "subscriber": True, |             "subscriber": True, | ||||||
|                 "msgid": True, |             "msgid": True, | ||||||
|                 "user": CONF['IRC_USERNAME'], |             "user": CONF['IRC_USERNAME'], | ||||||
|                 "length": CONF['IRC_TTS_LEN'], |             "length": CONF['IRC_TTS_LEN'], | ||||||
|                 "queuetime": datetime.datetime.now(), |             "queuetime": datetime.datetime.now(), | ||||||
|                 "timestamp": str(time.time_ns()) |             "timestamp": str(time.time_ns()) | ||||||
|             } |         } | ||||||
|             msg_queue[raw_msg['timestamp']] = [raw_msg['user'], raw_msg['msg']] |         msg_queue[raw_msg['timestamp']] = [raw_msg['user'], raw_msg['msg']] | ||||||
| 
 | 
 | ||||||
|         return True |         return True | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue