slacker icon indicating copy to clipboard operation
slacker copied to clipboard

Ability to set the helpDefinition when creating the SlackerClient

Open AlonGluz opened this issue 1 year ago • 3 comments

I would like to manually set the helpDefinition to avoid triggering the help command when I write help in the message content

AlonGluz avatar Jul 23 '24 12:07 AlonGluz

I'll be happy to solve it by the way (if possible)

AlonGluz avatar Jul 23 '24 12:07 AlonGluz

We do allow you to override the "help" output, but if you want to turn it off, a simple change will be required

You will need to provide an option in the "options" file and then use it to test whether it's enabled in this line https://github.com/slack-io/slacker/blob/main/slacker.go#L422

raed-shomali avatar Jul 23 '24 13:07 raed-shomali

I duplicated the code for help, disabled the standard help, and just mapped my mybot-help or mybot help. My use case was I am triggering on words, not bot mentions, so any help triggered the bot in this mode. I basically reproduced the help as a command so I could custom map the trigger words to be more specific to my need.

If that's of interest I'll see about extracting out the code for you, otherwise Raed's directions probably are less convoluted :-)

sheldonhull avatar Jul 25 '24 18:07 sheldonhull