The document website is missing the guide for listener matchers. We can have a simple guide with an example code as part of the "Listener Middleware" section.
target_user_id = "U03E94MK0"
def is_allowed_user(context) -> bool:
return context.user_id == target_user_id
@app.event(
"app_mention",
matchers=[
lambda context: context.user_id == target_user_id # or is_allowed_user
],
)
def event_test(event, say):
say(f"Hi there, <@{event['user']}>!")
The page URLs
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
The document website is missing the guide for listener matchers. We can have a simple guide with an example code as part of the "Listener Middleware" section.
The page URLs
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.