diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d987a7..e99b46c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. +## [1.6.1] - 2022-08-25 + +### Fixed 1.6.1 + +* Type Error during pick +* Improved command handling + ## [1.6.0] - 2022-08-25 ### Added 1.6.0 diff --git a/tts.exe b/tts.exe index e3cc08e..735769f 100644 Binary files a/tts.exe and b/tts.exe differ diff --git a/tts.py b/tts.py index 6c33f27..8fe5ad8 100644 --- a/tts.py +++ b/tts.py @@ -165,28 +165,34 @@ class IRC: self.pickcount = self.pickcount + 1 self.pickme.append(user) logging.debug("pickme %s added", user) + return if msg.startswith('#') and self.quickvote_status is True: logging.info('Quickvote: Cast detected') self.pollcount += 1 self.poll[user] = msg.lower() logging.debug("poll: %s", self.poll) + return if msg.startswith('!tts'): logging.info('!tts command detected') self.Commands.tts(self, message, tags) + return if msg.startswith('!addquote'): logging.debug("!addquote command detected") self.Commands.addquote(self, tags, msg) + return if msg.startswith('!wiki'): logging.debug("!wiki command detected") self.Commands.wiki(self, tags, msg) + return if msg.startswith('!smartquote') or msg.startswith('!sq'): logging.debug("!smartquote command detected") self.Commands.quote(self, tags, msg) + return def get_tags(self, resp): """ Strip tags from response """ @@ -718,7 +724,7 @@ class IRC: logging.debug("Got %s participats, wanted %s", self.pickcount, self.picknumber) try: - if self.pickcount > self.picknumber: + if int(self.pickcount) > int(self.picknumber): picks = random.sample(self.pickme, self.picknumber) logging.info('Got more than the requested number of participants') else: @@ -728,6 +734,7 @@ class IRC: converted_picks = [str(element) for element in picks] joined_picks = " ".join(converted_picks) except: # pylint: disable=bare-except + logging.error("There was an eroor during picking.") joined_picks = False if joined_picks: