mirror of
				https://gitlab.com/gpvkt/twitchtts.git
				synced 2025-10-31 17:17:35 +01:00 
			
		
		
		
	Read out vote results directly
This commit is contained in:
		
							parent
							
								
									2714afc074
								
							
						
					
					
						commit
						053796ffdd
					
				
					 1 changed files with 7 additions and 5 deletions
				
			
		
							
								
								
									
										12
									
								
								tts.py
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								tts.py
									
										
									
									
									
								
							|  | @ -208,7 +208,7 @@ class IRC: | ||||||
|                             self.sendmsg(conf['IRC_CHANNEL'], "@chat", conf['MESSAGE']['VOTEEND']) |                             self.sendmsg(conf['IRC_CHANNEL'], "@chat", conf['MESSAGE']['VOTEEND']) | ||||||
|                             self.sendmsg(conf['IRC_CHANNEL'], "*", conf['MESSAGE']['VOTENOBODY']) |                             self.sendmsg(conf['IRC_CHANNEL'], "*", conf['MESSAGE']['VOTENOBODY']) | ||||||
| 
 | 
 | ||||||
|                             msg = { |                             raw_msg = { | ||||||
|                                 "TTS": True, |                                 "TTS": True, | ||||||
|                                 "msg": conf['MESSAGE']['VOTENOBODY'], |                                 "msg": conf['MESSAGE']['VOTENOBODY'], | ||||||
|                                 "badges": True, |                                 "badges": True, | ||||||
|  | @ -219,7 +219,8 @@ class IRC: | ||||||
|                                 "queuetime": datetime.datetime.now(), |                                 "queuetime": datetime.datetime.now(), | ||||||
|                                 "timestamp": str(time.time_ns()) |                                 "timestamp": str(time.time_ns()) | ||||||
|                             } |                             } | ||||||
|                             msg_queue_raw.append(msg) |                             msg_queue[raw_msg['timestamp']] = [raw_msg['user'], raw_msg['msg']] | ||||||
|  | 
 | ||||||
|                             logging.info('The result is: %s', conf['MESSAGE']['VOTENOBODY']) |                             logging.info('The result is: %s', conf['MESSAGE']['VOTENOBODY']) | ||||||
|                             logging.debug('Votemsg: %s', msg) |                             logging.debug('Votemsg: %s', msg) | ||||||
| 
 | 
 | ||||||
|  | @ -234,9 +235,9 @@ class IRC: | ||||||
| 
 | 
 | ||||||
|                         logging.debug(count) |                         logging.debug(count) | ||||||
| 
 | 
 | ||||||
|                         msg = { |                         raw_msg = { | ||||||
|                             "TTS": True, |                             "TTS": True, | ||||||
|                             "msg": conf['MESSAGE']['VOTERESULT'] +" "+ str(count[0]), |                             "msg": conf['MESSAGE']['VOTERESULT'] +" "+ str(count[0][0].replace('#','')), | ||||||
|                             "badges": True, |                             "badges": True, | ||||||
|                             "subscriber": True, |                             "subscriber": True, | ||||||
|                             "msgid": True, |                             "msgid": True, | ||||||
|  | @ -245,7 +246,8 @@ class IRC: | ||||||
|                             "queuetime": datetime.datetime.now(), |                             "queuetime": datetime.datetime.now(), | ||||||
|                             "timestamp": str(time.time_ns()) |                             "timestamp": str(time.time_ns()) | ||||||
|                         } |                         } | ||||||
|                         msg_queue_raw.append(msg) |                         msg_queue[raw_msg['timestamp']] = [raw_msg['user'], raw_msg['msg']] | ||||||
|  | 
 | ||||||
|                         logging.info('The result is: %s', conf['MESSAGE']['VOTERESULT'] +" "+ str(count[0])) |                         logging.info('The result is: %s', conf['MESSAGE']['VOTERESULT'] +" "+ str(count[0])) | ||||||
|                         logging.debug('Votemsg: %s', msg) |                         logging.debug('Votemsg: %s', msg) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue