mirror of https://gitlab.com/gpvkt/twitchtts.git
Minor fixes
This commit is contained in:
parent
e7ab7e0bf1
commit
24b5abb0d4
|
@ -2,6 +2,13 @@
|
||||||
|
|
||||||
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`, otherwise the bot might fail to start.
|
||||||
|
|
||||||
|
## [1.6.1] - 2022-08-25
|
||||||
|
|
||||||
|
### Fixed 1.6.1
|
||||||
|
|
||||||
|
* Type Error during pick
|
||||||
|
* Improved command handling
|
||||||
|
|
||||||
## [1.6.0] - 2022-08-25
|
## [1.6.0] - 2022-08-25
|
||||||
|
|
||||||
### Added 1.6.0
|
### Added 1.6.0
|
||||||
|
|
9
tts.py
9
tts.py
|
@ -165,28 +165,34 @@ class IRC:
|
||||||
self.pickcount = self.pickcount + 1
|
self.pickcount = self.pickcount + 1
|
||||||
self.pickme.append(user)
|
self.pickme.append(user)
|
||||||
logging.debug("pickme %s added", user)
|
logging.debug("pickme %s added", user)
|
||||||
|
return
|
||||||
|
|
||||||
if msg.startswith('#') and self.quickvote_status is True:
|
if msg.startswith('#') and self.quickvote_status is True:
|
||||||
logging.info('Quickvote: Cast detected')
|
logging.info('Quickvote: Cast detected')
|
||||||
self.pollcount += 1
|
self.pollcount += 1
|
||||||
self.poll[user] = msg.lower()
|
self.poll[user] = msg.lower()
|
||||||
logging.debug("poll: %s", self.poll)
|
logging.debug("poll: %s", self.poll)
|
||||||
|
return
|
||||||
|
|
||||||
if msg.startswith('!tts'):
|
if msg.startswith('!tts'):
|
||||||
logging.info('!tts command detected')
|
logging.info('!tts command detected')
|
||||||
self.Commands.tts(self, message, tags)
|
self.Commands.tts(self, message, tags)
|
||||||
|
return
|
||||||
|
|
||||||
if msg.startswith('!addquote'):
|
if msg.startswith('!addquote'):
|
||||||
logging.debug("!addquote command detected")
|
logging.debug("!addquote command detected")
|
||||||
self.Commands.addquote(self, tags, msg)
|
self.Commands.addquote(self, tags, msg)
|
||||||
|
return
|
||||||
|
|
||||||
if msg.startswith('!wiki'):
|
if msg.startswith('!wiki'):
|
||||||
logging.debug("!wiki command detected")
|
logging.debug("!wiki command detected")
|
||||||
self.Commands.wiki(self, tags, msg)
|
self.Commands.wiki(self, tags, msg)
|
||||||
|
return
|
||||||
|
|
||||||
if msg.startswith('!smartquote') or msg.startswith('!sq'):
|
if msg.startswith('!smartquote') or msg.startswith('!sq'):
|
||||||
logging.debug("!smartquote command detected")
|
logging.debug("!smartquote command detected")
|
||||||
self.Commands.quote(self, tags, msg)
|
self.Commands.quote(self, tags, msg)
|
||||||
|
return
|
||||||
|
|
||||||
def get_tags(self, resp):
|
def get_tags(self, resp):
|
||||||
""" Strip tags from response """
|
""" Strip tags from response """
|
||||||
|
@ -718,7 +724,7 @@ class IRC:
|
||||||
logging.debug("Got %s participats, wanted %s", self.pickcount, self.picknumber)
|
logging.debug("Got %s participats, wanted %s", self.pickcount, self.picknumber)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if self.pickcount > self.picknumber:
|
if int(self.pickcount) > int(self.picknumber):
|
||||||
picks = random.sample(self.pickme, self.picknumber)
|
picks = random.sample(self.pickme, self.picknumber)
|
||||||
logging.info('Got more than the requested number of participants')
|
logging.info('Got more than the requested number of participants')
|
||||||
else:
|
else:
|
||||||
|
@ -728,6 +734,7 @@ class IRC:
|
||||||
converted_picks = [str(element) for element in picks]
|
converted_picks = [str(element) for element in picks]
|
||||||
joined_picks = " ".join(converted_picks)
|
joined_picks = " ".join(converted_picks)
|
||||||
except: # pylint: disable=bare-except
|
except: # pylint: disable=bare-except
|
||||||
|
logging.error("There was an eroor during picking.")
|
||||||
joined_picks = False
|
joined_picks = False
|
||||||
|
|
||||||
if joined_picks:
|
if joined_picks:
|
||||||
|
|
Loading…
Reference in New Issue