A :thumbsup: and :thumbsdown: counter keyboard for Telegram bots and channels
Project description
# Thumbot
![thumb](http://i.giphy.com/I83tvEbSgRy8M.gif)
**Thumbot** is a :thumbsup: :thumbsdown: counter keyboard for Telegram bots and channels.
![photo31331718161082944](https://cloud.githubusercontent.com/assets/431892/21070814/1a44c100-be75-11e6-9995-06a82bce7e41.jpg)
## Requirements
- Python;
- Your bot/channel must be created with [pyTelegramBotAPI](https://github.com/eternnoir/pyTelegramBotAPI);
- MongoDB;
## Running
- Your're going to need to run an instance of [MongoDB](https://mongodb.com). For tests porpuse (or even production, but with some concerns) you can use [Docker](https://docker.com/) and get a container running in some minutes:
`$ docker run -d -p 27017:27017 mongo`
- To install Thumbot is pretty easy:
`$ pip install thumbot`
- Now, you're ready to include the Thumbot keyboard in your bot or channel!
## Usage
```py
from thumbot import Thumbot
# Create a new instance of Thumbot passing chat and message ids:
thumbot = Thumbot(chat_id, message_id)
# Now you can vote up and down with the methods .up() and .down(),
# always passing the id of the user that is voting:
thumbot.up(user_id)
thumbot.down(user_id)
```
Check out the [example.py](https://github.com/rougeth/thumbot/blob/master/example.py) to see a full working bot using Thumbot.
### Bots and Channels using Thumbot:
- [@on_sale](https://telegram.me/on_sale)
![thumb](http://i.giphy.com/I83tvEbSgRy8M.gif)
**Thumbot** is a :thumbsup: :thumbsdown: counter keyboard for Telegram bots and channels.
![photo31331718161082944](https://cloud.githubusercontent.com/assets/431892/21070814/1a44c100-be75-11e6-9995-06a82bce7e41.jpg)
## Requirements
- Python;
- Your bot/channel must be created with [pyTelegramBotAPI](https://github.com/eternnoir/pyTelegramBotAPI);
- MongoDB;
## Running
- Your're going to need to run an instance of [MongoDB](https://mongodb.com). For tests porpuse (or even production, but with some concerns) you can use [Docker](https://docker.com/) and get a container running in some minutes:
`$ docker run -d -p 27017:27017 mongo`
- To install Thumbot is pretty easy:
`$ pip install thumbot`
- Now, you're ready to include the Thumbot keyboard in your bot or channel!
## Usage
```py
from thumbot import Thumbot
# Create a new instance of Thumbot passing chat and message ids:
thumbot = Thumbot(chat_id, message_id)
# Now you can vote up and down with the methods .up() and .down(),
# always passing the id of the user that is voting:
thumbot.up(user_id)
thumbot.down(user_id)
```
Check out the [example.py](https://github.com/rougeth/thumbot/blob/master/example.py) to see a full working bot using Thumbot.
### Bots and Channels using Thumbot:
- [@on_sale](https://telegram.me/on_sale)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
thumbot-0.1.0.tar.gz
(2.4 kB
view details)
File details
Details for the file thumbot-0.1.0.tar.gz
.
File metadata
- Download URL: thumbot-0.1.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c521ffc9be4c46a6237a69246f2ce41472a4bb52451991f61767abbf5925626 |
|
MD5 | 6e6479ee2dae6edc37a7f1ef5e897c95 |
|
BLAKE2b-256 | 8f24f3451f0d8d56750a87bf4bb4569ce4bd904cf35136bb0dc52a7e7da8a07f |