Closed SnghDaman closed 3 months ago
Hi @SnghDaman, thanks for asking the question.
It seems your code has a few print statements. When you mention the bot user, do you observe the print outputs on your console? If not, your app_mention event subscription might not be properly configured (or re-installing the app might be necessary if you haven't done it). If you see the outputs but the chat.postMessage API call is missing, your code might not be working as expected for some reason.
If you mean some of the mentions are ignored by your app, there are a few possibilities:
I'd recommend narrowing down the possible cause by checking the request logs to your app, enabling debug-level logging, and adding more debug prints. During the debugging process, please feel free to ask questions whenever you find something unclear or unexpected on the Bolt framework side. We are unable to assist with your infrastructure settings or app settings, but we're happy to share information about this SDK!
Thank you so much, @seratch. We reinstalled our app but hadn't revoked the app-level token initially. After refreshing the app-level token, everything worked smoothly. However, I have one question: when we send multiple questions to our application simultaneously, we see the temporary message getting posted for only one question rarely, but the API endpoint response doesn't come through, and nothing appears in the app-level logs. How can we rectify such issues?
If you mention the bot twice, you will receive two event delivery for sure and usually there is no race condition. Your question seems to be associated to how you implement your app.
i have mentioned the bot about 10 times in 10-15 secs and observed like out of 10 one message shows me temporary message as per the above code i shared like ("stay tuned, working on your request"). but doesn't get a response from the llm api, i can rectify this at my end . but at least i should see that temporary message logged in the app logs, so does it have to do anything with slack sdk app_mention event like the rate limit or something?
does it have to do anything with slack sdk app_mention event like the rate limit or something?
No, I don't think so. This level of traffic is totally fine. I guess some parts of your code might be causing the unexpected behavior.
thanks @seratch , also how many concurrent messages this app would handle at one time, can you please tell?
If your app receives other events at a high volume, this rate limit may affect it:
Event deliveries to your server via the Events API are rate limited to 30,000 deliveries per workspace per hour. https://api.slack.com/apis/rate-limits#events
If your app subscribes only to app_mention events, I am sure that there is no limit for concurrency.
Awesome thanks for the help
Le me close this issue now, but if you have any questions about the SDK, please feel free to write in at any time!
(Filling out the following details about bugs will help us solve your issue sooner.)
Reproducible in:
The
slack_bolt
versionslack-sdk==3.26.1 slack_bolt==1.19.0
Python runtime version
python 3.12
OS info
Linux ubunto
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., setup.py))
Expected result:
We expect that when we mention or call the bot using
@bot_name
and ask a query, it should reply to all messages. For example:Message:
@botname hello
Reply: chat_postMessage in the same thread -> Hello, my name is ...Actual result:
Message:
@botname hello
no replies sometimeRequirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.