Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Resolving Issue #72] Implemented !search functionality. #233

Closed
wants to merge 2 commits into from

Conversation

harjyotbagga
Copy link

@harjyotbagga harjyotbagga commented Oct 9, 2020

Implemented Slash-Search. A command to use the slack bot to get StackOverflow links for the doubts a user has.
Can be invoked by !search
resolves #72

)

except Exception:
logger.debug(f"Exception thrown while logging message_changed {event}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I see in the logs when I type !search python

2020-10-13 16:39:33,787 - pybot.endpoints.slack.messages - INFO - tech tips logging: Slack Message: {'client_msg_id': '8022b1f4-feab-4e53-b46e-7b2000c4e9c8', 'type': 'message', 'text': '!search python', 'user': 'U017J0CTMDX', 'ts': '1602625173.002100', 'team': 'T0175BDSM26', 'blocks': [{'type': 'rich_text', 'block_id': '82x', 'elements': [{'type': 'rich_text_section', 'elements': [{'type': 'text', 'text': '!search python'}]}]}], 'channel': 'C017BGVGE4U', 'event_ts': '1602625173.002100', 'channel_type': 'channel'}
2020-10-13 16:39:33,787 - pybot.endpoints.slack.messages - DEBUG - Exception thrown while logging message_changed Slack Message: {'client_msg_id': '8022b1f4-feab-4e53-b46e-7b2000c4e9c8', 'type': 'message', 'text': '!search python', 'user': 'U017J0CTMDX', 'ts': '1602625173.002100', 'team': 'T0175BDSM26', 'blocks': [{'type': 'rich_text', 'block_id': '82x', 'elements': [{'type': 'rich_text_section', 'elements': [{'type': 'text', 'text': '!search python'}]}]}], 'channel': 'C017BGVGE4U', 'event_ts': '1602625173.002100', 'channel_type': 'channel'}

It doesn't seem particularly useful for debugging to know the event. We should probably log the error instead of the event if something goes wrong.

@aaron-junot
Copy link
Member

I printed the error I was getting and this is what the message is

object SearchStockOverflow can't be used in 'await' expression

Please try to fix this. If you need, we can probably jump on a call to troubleshoot your setup some more. Now that I've seen the failed dispatch message and fixed it for myself, I feel like we might be able to fix it for you, too

@aaron-junot
Copy link
Member

Fixes #72 I think

Copy link
Author

@harjyotbagga harjyotbagga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there changes that need to be made?

@JudsonStevens
Copy link
Collaborator

Thanks a bunch for your work here. Our apologies that we didn't get it merged! We've decided to rewrite the bot and as such will be closing this PR. We'll definitely be using your work to add this feature into the rewrite. I'll be adding you as a coauthor to the commit that implements this feature. Again, thanks for the work and sorry we didn't get it in sooner!

@harjyotbagga harjyotbagga deleted the slash-search branch February 11, 2022 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slack Command !search
3 participants