Slackbot receiving messages and posting the message back to the user

Viewed 11

I am completely new to coding but am trying write a slackbot that logs down comments from users in the company.

How do i get the bot to repeat back a message from the user, to confirm that the message is correct?

Here is what i have done so far, but i am only able to respond to the user with a view without having any idea what the user's message was.

app.message("", async ({ event, say }) => {
  console.log(event);
  say({
    
    blocks: [
      {
        type: "section",
        text: {
          type: "plain_text",
          text: "Logging an issue?",
          emoji: true,
        },
      },
      //Category
      {
        type: "section",
        text: {
          type: "mrkdwn",
          text: "Category",
        },

Is there a code that i can add to store the message "" as a var or something and then say() it back to the user in response?

0 Answers
Related