https://github.com/5ht/nynpo
Nynpo Telegram Bot
https://github.com/5ht/nynpo
Last synced: 6 months ago
JSON representation
Nynpo Telegram Bot
- Host: GitHub
- URL: https://github.com/5ht/nynpo
- Owner: 5HT
- Created: 2018-02-27T08:57:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-27T10:19:04.000Z (about 8 years ago)
- Last Synced: 2025-02-14T06:52:44.561Z (about 1 year ago)
- Language: Erlang
- Homepage:
- Size: 315 KB
- Stars: 1
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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