https://discord.gg/botpress logo
Slack integration config to respond to only mentio...
# 🤝help
s
Id like for the Slack integration to only respond if the bot is @mentioned. All responses should be in a thread - either start a thread or reply to the thread it was mentioned it. How can this be setup in Botpress or is this not possible? What I'm seeing is the bot responses to messages that its not mentioned in and it never replies in threads. Thanks!
p
Have you toggled on those features in the integration configurations?
s
Ive tried all combinations of the settings and get the same behavior (responds to all messages and responses to top level messages are not made in threads). Is there a particular workflow setup that is required for Slack? I have it using an AN.
@prehistoric-airplane-85682 Im wondering if this is a bug? I believe this is the relevant Slack integration code here: https://github.com/botpress/botpress/blame/master/integrations/slack/src/webhook-events/handlers/message-received.ts#L86 The AI is telling me that slackEvent.channel will never be the literal "channel" string but it will be the channel id (like "C092QUURKAM"). I also see that channel ID value in the slack:channelId message tag. So is this code wrong?
const isSentInChannel = slackEvent.channel === 'channel'
c
Did this ever get figured out? I'm trying to do the same thing and getting issues. Basically I can get the bot to only respond in thread if it's mentioned, but it will respond outside-of-thread if not mentioned and it will respond BOTH in-thread and out-of-thread if mentioned