Naltox / telegram-node-bot

Node module for creating Telegram bots.
MIT License
721 stars 143 forks source link

409 webhook vs pollling #83

Closed sersasa closed 8 years ago

sersasa commented 8 years ago

Hi there, I have set a webhook for my bot from a browser using telegram api before using this code, and Telegram return an OK answer.

Than, when I use this code (great code for instance, thanks!) I get this error: [warn] Api error: Body: { ok: false, error_code: 409, description: 'Conflict: another webhook is active' }

How can I resolve it? Can I use webhook with your code? Can I only use polling-method instead webhook!? Thanks in advaced!

Tpona commented 8 years ago

It seems, that this framework works only throught pooling method

Konfuze commented 8 years ago

@sersasa try to pass an empty string to webhook url parameter (https://core.telegram.org/bots/api#setwebhook)

sersasa commented 8 years ago

But that's for "unset" webhook (i.e., use polling instead webhook) and I don't want that! I want to use the more efficient way for bots: webhook. Is this example of bot able to use webhook technic? How? Hundred thanks in advanced!! (apart from the kind of answer you'll give me :))

LBreda commented 8 years ago

@sersasa This framework does not support webhooks.