mullwar / telebot

The easy way to write Telegram bots in Node.js
https://www.npmjs.com/package/telebot
MIT License
1.48k stars 270 forks source link

how to get the JSON payload in a POST? #164

Open Bimblis opened 5 years ago

Bimblis commented 5 years ago

I can send GET and POST request to the telegram bot, and they are responded and have a 200.

Is it possible for telebot to read this requests and just do a console.log with the contents? Something like:

const TeleBot = require('telebot');
const bot = new TeleBot('xxxxxxxxxXXXXXXXXXXxxxxxxxxxxXXXXXXXXXX');

bot.on(['GET'], (bodyJson) => console.log(bodyJson));

bot.start();
Bimblis commented 5 years ago

Btw, this project is abandoned, right?