Skip to main content

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for thumbot, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size thumbot-0.1.0.tar.gz (2.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page