discord command

Hello! I have a problem, I want the user to be able to send the command along with a word (for example, @twitter123) so that it reply with some associated data in a google sheets table.

I already know how to do everything except the command. It could be /infokini (@twitter123 of each person). How do I add in the trigger “(@twitter123 of each person)”?

Hi @leondg.77,

To achieve this, you can use an HTTP trigger for your workflow. Users can send a request to the trigger’s endpoint with the command and the word as query parameters, like /infokini?command=twitter123.

Here’s an example of how you can set up the HTTP trigger and read the command from the query parameters:

export default {
  type: "app",
  app: "http",
  http: {
    type: "request",
    method: "GET",
    path: "/infokini",
  },
  async run({ event }) {
    const command = event.query.command;
    // Now you can use the command to look up associated data in the Google Sheets table
  },
};

After setting up the HTTP trigger, you can use the command variable to look up the associated data in your Google Sheets table. You’ll need to use the Google Sheets API to interact with the table. For more information on using the Google Sheets API, you can refer to the Google Sheets API documentation.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.