operationcode-pybot icon indicating copy to clipboard operation
operationcode-pybot copied to clipboard

Slack Command !search

Open apex-omontgomery opened this issue 5 years ago • 16 comments

!search how to print line java will look through stackoverflow or google for results and then post a link.

apex-omontgomery avatar May 05 '19 23:05 apex-omontgomery

Hello, I would like to work on this

the-bose avatar Oct 01 '19 01:10 the-bose

I would like to take this task.

utkryuk avatar Oct 07 '19 09:10 utkryuk

Hey, I would like to try and resolve this issue, by adding the !search command. Request you to assign it to me. Since I'm just starting out with open source, it'd be great if you could give me a week's time, to solve this issue with a PR. :smile:

harjyotbagga avatar Oct 03 '20 20:10 harjyotbagga

@harjyotbagga We'd love the help. If you have any questions, let us know!

aaron-junot avatar Oct 04 '20 20:10 aaron-junot

Thanks for the positive response! :smile: I've started working on it. Please assign this issue to me. I'll get back in a couple of days.

harjyotbagga avatar Oct 04 '20 20:10 harjyotbagga

@aaron-suarez I needed a bit of help. I followed all the steps in the readme.

  • [x] Made a slack app and integrated it into my workspace.
  • [x] Updated the pybot.env variables, using the Secret code and the O-Auth token from the Slack app.
  • [x] Installed all dependencies and was able to successfully run the bot on the localhost.
  • [x] Made my localhost open to the public using ngrok.
  • [x] To test a few commands, I added the command in slash-commands on the slack API, setting the URL as https://54bac023ae26.ngrok.io.

After which I tried running the command on slack, giving me a "dispatch error" and "401 Unauthorized" on my terminal. Pl note, I have verified the auth tokens and there is no issue there. I would appreciate some guidance from your end.

[https://github.com/slackapi/bolt-js/issues/579 ] A similar issue has been reported here.

pybot-term

pybot-commands

pybot-slack

harjyotbagga avatar Oct 05 '20 21:10 harjyotbagga

Oh weird, so the bot itself is producing a 401? What happens when you hit it manually (with like Postman or curl, rather than going through slack)?

aaron-junot avatar Oct 05 '20 21:10 aaron-junot

I have tried sending the request via Postman. I made an OAuth2.0 authentication token by reading the Slack App docs and sent a POST request to https://df94f7be0da7.ngrok.io/slack/commands?command=roll after I updated the slash command request URL in the slack app dashboard. I got a 500 Server Internal Error that looks something like, pybot-err I am not able to understand how do I fix this internal error. I am getting no error on the python terminal when I send the command via slack, but the response states /roll failed with the error "dispatch_failed" and the the ngrok terminal still says 401 Unauthorized. Any guidance would be more than helpful.

harjyotbagga avatar Oct 07 '20 19:10 harjyotbagga

If you join our slack team at https://operationcode.org/join I'd be happy to set up a slack call and pair with you on troubleshooting it. I don't know from just looking at it what the problem could be.

aaron-junot avatar Oct 07 '20 21:10 aaron-junot

I just got the /roll failed with the error "dispatch_failed" error on my slack workspace as well... I'm wondering if this warrants an issue. @AllenAnthes when you get a chance can you check and see if you also get this error?

aaron-junot avatar Oct 09 '20 22:10 aaron-junot

Note, it does not happen on prod right now (which is good). I wonder if it's something that we introduced recently...

aaron-junot avatar Oct 09 '20 22:10 aaron-junot

I think it might be related to https://github.com/OperationCode/operationcode-pybot/pull/227. @livinginsyn did you ever see this "dispatch_failed" situation when you were working on the issue?

aaron-junot avatar Oct 09 '20 22:10 aaron-junot

Little chance it was this change. All I did was change a n+1 to n

On Fri, Oct 9, 2020 at 6:26 PM Aaron Suarez [email protected] wrote:

I think it might be related to #227 https://github.com/OperationCode/operationcode-pybot/pull/227. @LivingInSyn https://github.com/LivingInSyn did you ever see this "dispatch_failed" situation when you were working on the issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OperationCode/operationcode-pybot/issues/72#issuecomment-706424516, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQMJCLBK7UET2FAZN6SNWLSJ6E2NANCNFSM4HK4MAEA .

LivingInSyn avatar Oct 09 '20 22:10 LivingInSyn

I noticed that we merged that to master directly and our branches are based on staging, so it's true, it's not due to #227... Perhaps another recent change. I'll dig deeper when I have a chance, I'm not sure I'll be able to right now

aaron-junot avatar Oct 09 '20 22:10 aaron-junot

I was able to resolve it by making sure that the right ngrok url was in, and that my bot was running correctly. So I'm thinking it might be an issue like that @harjyotbagga

aaron-junot avatar Oct 09 '20 22:10 aaron-junot

We'll be implementing this based on previous work into the new rewritten bot. This one is fairly low priority though so may take a bit.

JudsonStevens avatar Jan 01 '22 23:01 JudsonStevens