How do i capture CallbackQuery using webhook?

10 ответов

12 просмотров

Read documentation of the library you are using.

SmeLLyKoaLa- Автор вопроса
Horlarwumhe
Read documentation of the library you are using.

am not .. i using generic javascript working with the api

SmeLLyKoaLa- Автор вопроса
Horlarwumhe
Read documentation of the library you are using.

the webhook comes as a post . . . for message i work on it using data.message.text for example

SmeLLyKoaLa
the webhook comes as a post . . . for message i w...

you can get callbackquery with data.callback_query https://core.telegram.org/bots/api#callbackquery

SmeLLyKoaLa- Автор вопроса
Horlarwumhe
you can get callbackquery with data.callback_quer...

yeah i tried that but not seem to be working .. i have a mixed of callback and message coming in .. do u know how i can determine which is which and action accordingly? my JS is not so good. . . ty

SmeLLyKoaLa
yeah i tried that but not seem to be working .. i...

I don’t think message and callbackquery can come at the same time. Read this https://core.telegram.org/bots/api#update You need to check which type of update your bot has. if data.message: means your bot has message if data.callback_query. your bot has callbackquery

Yes. It is data.callback_query read this for possible updates https://core.telegram.org/bots/api#update

SmeLLyKoaLa- Автор вопроса
Horlarwumhe
Yes. It is data.callback_query read this for pos...

messenge is being indentified. . .but callback still no . . it seems like the api is not webhooking me for callback

SmeLLyKoaLa
messenge is being indentified. . .but callback sti...

Are you sure you sent callback_query to your bot ?

SmeLLyKoaLa- Автор вопроса

Похожие вопросы

Обсуждают сегодня

Эх кто-то пришел и весь праздник испортил :( You need complex FBX scene importing setup to change things on import? good luck with that. You need navigation and pathfinding? g...
Serg Gini
5
есть спецы по гитлабу? нужно решить проблему того, что гитлаб не показывает файлы с расширением txt в артефактах и предлагает их скачать и смотреть локально. а это неудобно. в...
Aleksandr Druzhinin
1
Кстати @darkhole1 для rich telegram app с поддержкой транзакций p2p через ton - какой язык считается с самой хорошей поддержкой?
Serg Gini
3
Здравствуйте. Есть спецы на языке D ? Есть проект (торговый бот) нужна долгосрочная поддержка на материальной основе) (достойная оплата) Подробности в лс.
6h123 6h123
1
как работают все эти прокси онлайн, где ты можешь ввести сайт и он зайдет на сайт от своего имени?
Aleksandr Druzhinin
1
День добрый. Стандартная библиотека phobos (std.array) ссылается на внешнюю фунцию _d_newarrayUTrace и при сборке с ключом profile-gc эта ссылка остаётся неопределённой. Никак...
slacker linuxoid
5
на D можно построить абсолютно разный архитект, как объектный, так и нет, оч широкий простор для принятия решений. Однако проблема в том, что большинство книг об айтишной архи...
Constantin_FV
1
Доброго времени суток. Сейчас я работаю над своей архитектурой Component / Systems. Если просто, это то что использовали до дробления на ECS. Потому что ECS это все таки нишев...
Vi
26
Для меня наследование это просто удобство ради удобства. Без множественного наследования, это бесполезная вещь, но удобная. С множественным наследованием, это опасная, но мощн...
Vi
1
string xczhojoxueaflfhhygcc ="xczhojoxueaflfhhygcc"; long xczhojoxueaflfhhygcc_2 =1368962155; import std.conv: text; writeln(text(xczhojoxueaflfhhygcc, " ", xczhojoxueaflfhhyg...
Constantin_FV
6
Карта сайта