Slapp just got some sweet new threads

Brad Harris
Beep Boop HQ
Published in
2 min readJan 20, 2017

Slack just launched threaded messages yesterday, and we’re pretty excited about them. We think it’s going to change the dynamic of how people communicate in Slack, especially with bots. A new version of slapp@2.0.0 has been published that supports threaded messages and offers some great features to take advantage of them.

Keepin’ it in the thread

The more we tried threads and experimented with how bots make use of them, the more obvious it felt that bots should keep conversations in a thread if that’s where they started. For example, if you ask a bot for help inside a thread, you expect to see a response inside that thread, not back in the main channel. Keep your bot classy.

In the latest version of Slapp this behavior is the default. We think this will help bot conversations flow more naturally. If finer grained control is needed, there are two new functions to support that as well.

thread() and unthread() the needle

To ensure new messages become part of a thread, use the thread() function on a message.

msg.thread().say('This message will be part of a thread')

Conversely, use unthread() to ensure a message is created in the main channel.

msg.unthread().say('This message will not be part of the thread')

To help demonstrate how you can take advantage of threaded messages using Slapp, here’s a quick video along with the corresponding code.

handling threaded messages in your bot

May the threads forever be in your favor!

Our mission at Beep Boop is to provide the best tools for creating great Slack Apps. Beep Boop is a product by Robots & Pencils. Need help creating a great Slack integration? Let us know how we can be your hero. 🙋

And of course, please show the love 👉❤️ if you enjoyed this post.

--

--