henryivesjones / slash-slack

A python framework for building slack slash bots. Get input parsing and validation, command routing, async responses, auto-generated help dialog, response visibility, and response message formatting all for free.
https://pypi.org/project/slash-slack
GNU General Public License v3.0
4 stars 0 forks source link

Provide method to send a "working on it ..." message back to slack channel #4

Closed karimmohraz closed 1 year ago

karimmohraz commented 1 year ago

Dear Henry, thank you for this great repo. I am using it for my slack bot and it works great. However, I would like to know if there is any way not only to acknowledge with status code 200 that a request was sent to my api processing the command. I would like to provide a message like: "we are working on your request" while I am processing the request until the response from my processing api is finally returned. This can take a couple of minutes. thnx, karim

henryivesjones commented 1 year ago

Hi,

Thanks for using my library. This is a great suggestion and I have implemented it in the latest release v0.2.2.

I give the option to set a global acknowledge_response parameter to the SlashSlack object which can be overridden at the command level with the same parameter at the SlashSlack.command level.

https://github.com/henryivesjones/slash-slack/releases/tag/v0.2.2

https://github.com/henryivesjones/slash-slack#command-response-timeoutasync-responses

https://github.com/henryivesjones/slash-slack/blob/v0.2.2/example.py#L9 - SlashSlack

https://github.com/henryivesjones/slash-slack/blob/v0.2.2/example.py#L35 - SlashSlack.command

Thanks, and feel free to continue with suggestions.

karimmohraz commented 1 year ago

thnx for adding this so quickly 🥇 I already integrated into my slack bot and am sure it upgrades the user experience a lot!