0

I have two listeners. Whenever the message is sent to slack channel, handle_message_events to be invoked and timer to be started. If message contains confirm_button and its clicked then it should invoke confirm_button_click.

Its listening to some messages in the channel i.e invoking receive_message method for every message on the channel but for some messages does not invoke the method. Behaviour is inconsistent. I have added all the permissions to App chat:write, channel:message. App is the member of the channel.

Please help me in resolving the issue. Thank you

app = App(token = slack_bot_token, ignoring_self_events_enabled=False)
@app.evnt("message")
 def receive_message(body, say):
     pass
Niketa
  • 453
  • 2
  • 9
  • 24

1 Answers1

0

If you have multiple listeners for message events, only the first matched one is invoked. If you want to do something for all message events, you can have a global middleware. Another approach would be to move those logic into a single message event listener and dispatch events inside the function.

Kazuhiro Sera
  • 1,822
  • 12
  • 15