liddiard / slack-meetups

Slack bot that randomly pairs users in a Slack channel for 1:1 meetups. Meet new, interesting people in your company, club, or group!
https://harrisonliddiard.com/project/slack-meetups/
MIT License
18 stars 7 forks source link

Bot don't respond to the intro messages of the users in a pool #14

Open KohliAnuj opened 4 years ago

KohliAnuj commented 4 years ago

Hi- I was trying to set up the project locally. While the bot was able to dm each user to provide their intros, nothing happens after the user provides the same. The bot doesn't respond and in the backend, the user is not marked available. What could be the issue in the setup? Is it a oAuth permission issue- I have given all admin permission scope though to the application. Thanks

KohliAnuj commented 4 years ago

@liddiard, it would be great if you could help me with my issue. Im a bit stuck . Thanks

liddiard commented 4 years ago

Hi @KohliAnuj, are you using the master branch of the project (webhook-based), or the rtm branch (socket-based)?

If you're using the master branch, have you:

  1. Created an app for the bot at https://api.slack.com/apps/
  2. Enabled "Interactivity & Shortcuts" with a URL that's <your base URL>/slack/action/ and "Event Subscriptions" with a URL that's <your base URL>/slack/message/ for the same app? (see screenshots below for an example)
Screen Shot 2020-07-09 at 9 52 42 AM Screen Shot 2020-07-09 at 9 51 44 AM

Basically, Slack needs to have endpoints that are accessible on the public internet to send HTTP requests with the messages that the Meetups bot receives.

If you're running the Django server on your local computer, you'll probably need to use something like ngrok to expose it to the public internet. If you have the project deployed on a public web server, then you can use that server's hostname for the "base URL."

Feel free to let me know if you have followup questions. The setup instructions don't explain how to set up the connection between Slack and the server, and I should probably add that.

KohliAnuj commented 4 years ago

Thanks- it worked! Yes it would be helpful to others if you could add the above setup as well to readme

@liddiard wanted to ask another thing- right now GET /stats/ is showing not found. My channel name is #meetups. How should I put that in the channel name? I tried with meetups but it didn't work.

Thanks!

KohliAnuj commented 4 years ago

@liddiard it would be great if you could share how to fix the above query! thanks

liddiard commented 4 years ago

Hi @KohliAnuj, so sorry for the late reply, I need to check these notifications more often! Hope you were able to figure out the issue, but if not could you share a screenshot of the values you have for the "pool" fields in the admin and the URL you're trying to access? And just to be sure, the error it's giving you is a 404 when you try to access the "stats" page?

Here's an example of a configuration I have working:

Pool config in admin

Screen Shot 2020-08-12 at 10 06 04 AM

Corresponding stats page URL

Screen Shot 2020-08-12 at 10 06 47 AM

Anyway, let me know if you're still having this issue and I'll try to help. Made sure I'm getting email notifications for GitHub issues now so I should see these messages sooner.

liddiard commented 4 years ago

Also, I haven't had time to make a proper instructions writeup, but I added some info to the readme about my setup if you may find that useful.