An open API service indexing awesome lists of open source software.

https://github.com/5ht/nynpo

Nynpo Telegram Bot
https://github.com/5ht/nynpo

Last synced: 6 months ago
JSON representation

Nynpo Telegram Bot

Awesome Lists containing this project

README

          

Nynpo Telegram Bot
==================

Sample of [N2O_ASYNC](https://mqtt.n2o.space/man/n2o_async.htm) usage as Telegram Bot that counts number of users in particular channel or group and records it to files in CSV format. Extend it to your needs.

Options
-------

```erlang
{nynpo, [{bot,"548231922:AAHmXMMr38XGtH0tJMDUdiByheT2mZ7qkVI"},
{timer,{0,0,5}},
{rooms,["CanYaCommunity","HaskellRu","RuHaskell"]}]},
```

Bot is your API key, timer is granularity of tracking, rooms is a list of room you want to track.

Run
---

```sh
$ brew install erlang
$ ./nynpo repl
```

```sh
$ cat HaskellRu
2018/2/27, 10:52:40, "HaskellRu", -1001043143583, 670
2018/2/27, 10:52:47, "HaskellRu", -1001043143583, 670
2018/2/27, 10:52:52, "HaskellRu", -1001043143583, 670
2018/2/27, 10:52:57, "HaskellRu", -1001043143583, 670
```

Build
-----

```sh
$ ./nynpo dep com pla
$ ./nynpo release script nynpo
```

Tha last command will recreate `nynpo` escript executable runnable by Erlang ERTS.

Credits
-------
* Maxim Sokhatsky