slacker
slacker copied to clipboard
any advice on how to use for handling events like reacts, home opened and others?
I'm a bit confused on how I can properly use this to handle events like react added. When I create the bot := slacker .... it has the SocketModeHandler as part of the struct, but I'm unclear on the proper registration of handling specific events and had trouble translating from go-slack to this. No "HandleEvents" type methods existed, only unsupported interactions seemed available.
Any tips for handling event triggers, any examples? I'll do some github searching for more outside this repo, but figured I'd ask in case anyone has something to share :-)
Could you give us examples to clarify your needs?
If I understand correctly, you would like to handle the action of someone reacting with an emoji?
Yeah, so I see examples on go-slack on how to setup handling for things like reacts, app home entered, and others, but when I look at bot.SocketModeClient() i couldn't find any clear way to register specific handlers.
As a start, being able to trigger on apphome opened and specific react being added would be great. I want to do more with action/blockid soon and I realized a lot of the stuff comes up under "unsupportedinteraction" and has to be custom routed, so looking for some inspiration to better handle mapping of handlers for events.
bump @raed-shomali if you get the time. Just wanted to make sure you saw this. I love using slacker instead of setting all this up but the socketmodeclient and registering certain events is really unclear. Any guidance would be appreciated.
I see. I do not think this is currently supported in a straightforward manner, but I do not see why we couldn't add handlers to support such cases.
Originally, Slacker only supported handling commands. Then we added handlers to support action/block interactions and later on Cron Jobs.
Would you like to take a stab at it and put together a PR to support handling reactions and such?
@raed-shomali if you have a quick couple bullet points on guidance, I'll be glad to take a peek if I can get some spare time. Nothing detailed, just looking for a quick pointer at an example so I make sure I'm on the right track.
I think a good starting point would be to research what events do we get for reactions and AppHome interactions
If we do receive event, then it becomes a straightforward problem to solve. If we don't, it will be more complicated