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
Catching Direct Messages #199
Comments
@cgamio Hello, thanks for asking the question. I do understand this is a bit confusing but the event type to catch this pattern is not https://api.slack.com/events/message.im {
"token": "one-long-verification-token",
"team_id": "T061EG9R6",
"api_app_id": "A0PNCHHK2",
"event": {
"type": "message",
"channel": "D024BE91L",
"user": "U2147483697",
"text": "Hello hello can you hear me?",
"ts": "1355517523.000005",
"event_ts": "1355517523.000005",
"channel_type": "im"
},
"type": "event_callback",
"authed_teams": [
"T061EG9R6"
],
"event_id": "Ev0PV52K21",
"event_time": 1355517523
} Thus, updating your code as below should help. @app.event("message") I will improve this framework to raise an exception that tells what's wrong with the "message.*". |
Thanks for the heads up! So I'll expand that listener to include all of |
@cgamio Yes, you're on the right track 👍 Let me close this issue now. |
I'm trying to catch DM's and treat them differently from other messages. I've tried leveraging the
message.im
event type as described here, but that doesn't seem to be caught by using the event listener decoratorReproducible in:
Steps to reproduce:
message.im
typeExpected result:
The function should execute
Actual result:
The function is passed over, presumably because the event type doesn't fit.
and then nothing happens
The text was updated successfully, but these errors were encountered: