Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

answerShippingQuery calls Error #448

Closed
dobeerman opened this issue Oct 25, 2017 · 2 comments
Closed

answerShippingQuery calls Error #448

dobeerman opened this issue Oct 25, 2017 · 2 comments

Comments

@dobeerman
Copy link

I'm trying to make an answerShippingQuery with code example below, but something went wrong.
I've the following error:

Unhandled rejection Error: ETELEGRAM: 400 Bad Request: shipping options are not specified

bot.on("shipping_query", shipping => {
  const ok = true;
  const opts = {
    shipping_options: [
      {
        id: "shipping",
        title: "Shipping by seller",
        prices: [
          { label: "Shipping by seller 1", amount: 500 },
          { label: "Shipping by seller 2", amount: 500 }
        ]
      },
      {
        id: "takeaway",
        title: "Take away",
        prices: [{ label: "-Take away", amount: 0 }]
      }
    ],
    error_message: ""
  };

  bot.answerShippingQuery(shipping.id, ok, opts);
});
@drGOD
Copy link
Contributor

drGOD commented Nov 25, 2017

I have the same problem

upd.: I found how to solve the issue, and create pull request #468 for solution

@GochoMugo
Copy link
Collaborator

Fixed in v0.30.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants