mirror of
https://gitlab.com/gpvkt/twitchtts.git
synced 2025-04-19 02:02:26 +02: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'], "*", conf['MESSAGE']['VOTENOBODY'])
|
||||
|
||||
msg = {
|
||||
raw_msg = {
|
||||
"TTS": True,
|
||||
"msg": conf['MESSAGE']['VOTENOBODY'],
|
||||
"badges": True,
|
||||
|
@ -219,7 +219,8 @@ class IRC:
|
|||
"queuetime": datetime.datetime.now(),
|
||||
"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.debug('Votemsg: %s', msg)
|
||||
|
||||
|
@ -234,9 +235,9 @@ class IRC:
|
|||
|
||||
logging.debug(count)
|
||||
|
||||
msg = {
|
||||
raw_msg = {
|
||||
"TTS": True,
|
||||
"msg": conf['MESSAGE']['VOTERESULT'] +" "+ str(count[0]),
|
||||
"msg": conf['MESSAGE']['VOTERESULT'] +" "+ str(count[0][0].replace('#','')),
|
||||
"badges": True,
|
||||
"subscriber": True,
|
||||
"msgid": True,
|
||||
|
@ -245,7 +246,8 @@ class IRC:
|
|||
"queuetime": datetime.datetime.now(),
|
||||
"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.debug('Votemsg: %s', msg)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue