-1

How do I create a Slackbot that pops up a warning message (like a dialog box) when someone is about to type a message in a particular channel in Slack.

Bella K
  • 9
  • 1
  • Please repeat [on topic](https://stackoverflow.com/help/on-topic) and [how to ask](https://stackoverflow.com/help/how-to-ask) from the [intro tour](https://stackoverflow.com/tour). – Prune Feb 10 '21 at 00:49

1 Answers1

1

Slack doesn't allow dialog or modal boxes to appear without some sort of direct interaction (such as a slash command or clicking a button). This is meant to prevent third parties from spamming users.

If you have rules about who can speak when in a channel you might want to look at onboarding messages, which are pretty useful.

Robert Hafner
  • 3,364
  • 18
  • 23
  • Ahh I see, thank you for the response. The reason I wanted to do it this way was to prevent people from posting in the wrong channel. In my workspace there is a channel dedicated to emergencies only, and whenever anyone posts in that channel the entire management gets alerted. But a lot of people (even after numerous warnings) post non-emergency msgs in that channel by accident which is getting a bit annoying. Do you know of any other way this could be resolved? – Bella K Feb 10 '21 at 01:31
  • My company is small enough where we deal with this socially, and that may be an option here too. Technically speaking you're more limited though. Having a bot that sends alerts, rather than using conversations in the channel itself, is one option. Limiting who can send messages in the channel is another. – Robert Hafner Feb 10 '21 at 01:51