diff --git a/client_wrapper.py b/client_wrapper.py index f40dd6d..93b08ca 100644 --- a/client_wrapper.py +++ b/client_wrapper.py @@ -64,7 +64,6 @@ class ClientWrapper(object): async for t in self.spool_tasks(): if DEBUG_MODE: await t - print("Handling a message...!") async def spool_tasks(self) -> AsyncGenerator[asyncio.Task, Any]: async for msg in self.async_message_feed(): diff --git a/scroll_util.py b/scroll_util.py index 0c23b05..c46c9bf 100644 --- a/scroll_util.py +++ b/scroll_util.py @@ -46,7 +46,6 @@ async def scroll_callback(slack: SlackClient, msg: dict, match: Match) -> None: query = match.group(1).strip() # Try to get as int or by name - result = None try: sn = int(query) result = find_by_scroll(sn) @@ -58,7 +57,7 @@ async def scroll_callback(slack: SlackClient, msg: dict, match: Match) -> None: result = "Couldn't find brother {}".format(query) # Respond - print(slack_util.reply(slack, msg, result)) + slack_util.reply(slack, msg, result) def find_by_scroll(scroll: int) -> Optional[Brother]: @@ -95,7 +94,6 @@ async def find_by_name(name: str, threshold: Optional[float] = None) -> Brother: found, score = process.extractOne(name, all_names) found_index = all_names.index(found) found_brother = brothers[found_index] - print(score) if (not threshold) or score > threshold: return found_brother else: diff --git a/slack_util.py b/slack_util.py index 151a20e..bc078fa 100644 --- a/slack_util.py +++ b/slack_util.py @@ -146,17 +146,14 @@ class Hook(AbsHook): # Fail if pattern invalid match = re.match(self.pattern, msg['text'], flags=re.IGNORECASE) if match is None: - # print("Missed pattern") return None # Fail if whitelist defined, and we aren't there if self.channel_whitelist is not None and msg["channel"] not in self.channel_whitelist: - # print("Missed whitelist") return None # Fail if blacklist defined, and we are there if self.channel_blacklist is not None and msg["channel"] in self.channel_blacklist: - # print("Hit blacklist") return None return self.callback(slack, msg, match)