depoio / node-telegram-bot

Client wrapper for Telegram Bot API (Under heavy development)
MIT License
136 stars 30 forks source link

Bot analytics integration #34

Closed ollmer closed 8 years ago

ollmer commented 9 years ago

Hello! I`m a developer of the analytics service for telegram bots https://github.com/botanio/sdk

I want to offer integrate our sdk to this wrapper, so bot developer can get some analytics without much efforts. Is anyone interested in such enhancement?

rdev commented 9 years ago

Hi I already integerated botan.io into my bots made on this library and I totally support the idea of adding it to the library itself

strikeentco commented 9 years ago

Hello! I just finished writing my library (Teabot). This is not just a wrapper over the API. Teabot already supports botan.io analytics, also supported Redis and Aerospike as storage.

I hope this library will find its audience and will be developed further with the help of the community.

Do not consider for ad :)

shernshiou commented 9 years ago

Sure. What can I help?

ollmer commented 9 years ago

I think it should look like this

var bot = new Bot({
  token: 'TOKEN HERE'
})
.enableAnalytics(botan_api_key)
.on('message', function (message) {
  console.log(message);
})
.start();

If .enableAnalytics(botan_api_key) called, all messages should be sent to botan service as events before passing them to the callback. I can make a pull request if you agreed.

shernshiou commented 9 years ago

sure no problem!

ollmer commented 9 years ago

Ok, thanks! I`m going to code it this weekend and made pull request then.