CAKE-com / pumble-node-sdk

Pumble SDK for Node.js
5 stars 0 forks source link

/command Issue #15

Open Connor1304 opened 2 weeks ago

Connor1304 commented 2 weeks ago

when I run my /command it always times out are you able to give me a template on how I can send the data to an endpoint / how I could extend the time out period?

Thanks, Connor

milos-trivundza commented 2 weeks ago

Hi Connor, thanks for reaching out.

There are two things that potentially cause your issue.

First thing is that slash command is an action that requires acknowledgement, so you have to call ack() on each slash command call, something like this:

{
      command: "/command",
      handler: async (ctx) => {
          await ctx.ack();
          // ...rest of the code
       }
 }

(Check out this addon)

Another thing could be that you're using pumble-cli command and, by default, it is using localtunnel which sometimes could get blocked by firewall. If this is your case, you could expose your addon manually (or by using some other tunneling tool) and specify your dedicated endpoint and port by using something like pumble-cli --host=https://my.addon.service.com --port=9876.