Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

258
Vistas
How to make my Slack Bot reply as a thread?

I have a bot that's meant to reply to messages in a channel with certain keywords it's listening for. I have it deployed and it's working perfectly, but it replies in the channel rather than starting a thread to a user's message. Here's my code that's meant to start the thread:

app.message("ake up", async ({ command, say }) => {
  try {
    say({ text: "I'm awake! ⭐️ Do you need assistance?", thread_ts: message.ts });
  } catch (error) {
      console.log("err")
    console.error(error);
  }
});

Nothing happens when I send a message saying "wake up". When it's the same without thread_ts: message.ts and just says say("I'm awake! ⭐️ Do you need assistance?")}, it works perfectly. and responds with that.

Here's the beginning of my code for reference:

require("dotenv").config();
const app = new App({
  token: process.env.SLACK_BOT_TOKEN,
  signingSecret: process.env.SLACK_SIGNING_SECRET,
  socketMode:true,
  appToken: process.env.APP_TOKEN
});
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This was answered on GitHub.

The trick here is that thread_ts is available only for threaded messages (it identifies the parent message which started the thread). If you want to start a thread, you can use ts value of the incoming message:

app.message("ake up", async ({ message, say }) => {
  try {
      await say({ text: "I'm awake! ⭐️ Do you need assistance?" , thread_ts: message.thread_ts || message.ts});
  } catch (error) {
      console.log("err")
      console.error(error);
  }
});

See also Spotting threads guide in Slack docs.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda