telegram-voting-bot

A simple telegram voting bot based on the python-telegram-bot api.
*To make it more easy to use, I might make a C++ code in the future so you don't have to run through the steps

Prerequsites

  • Debian-based linux distros, wsl works (other distros might also work, but have not yet tested), for installation, see below
  • before proceeding, update and upgrade packages:
sudo apt update
sudo apt upgrade
  • python3 and pip installed:
sudo apt install python3 python3-pip
  • python-telegram-bot installed:
pip install python-telegram-bot --upgrade
  • git and nano installed (optional):
sudo apt install git nano

Installing ubuntu on Windows (WSL)

  1. In the search bar, search "features", and select "add or remove windows features"
  2. Select Windows Subsystem for Linux and Virtual machine platform in the list, then click ok
  3. Restart your computer
  4. In microsoft store, find ubuntu and install
  5. You may also want to install windows terminal in microsoft store
  6. open ubuntu.exe and finish setup

Running ubuntu in a virtual machine

  • You can use hyper-v, virtualbox, etc. for a desktop environment
  • To install hyper-v on windows home version, see my repository

Installing ubuntu on your android phone

  1. In F-Droid, find and install userLAnd
  2. select and setup ubuntu in userLAnd, use ssh for connection
  3. run sudo apt update and sudo apt upgrade

Building the bot

  1. Talk with @botfather in telegram to create a bot, and obtain its token
  2. Clone the repository:
git clone https://github.com/wcyat/telegram-voting-bot/
  1. Switch to directory:
cd telegram-voting-bot
  1. Edit votebot.py:
nano votebot.py

Replace <> values with your own (eg. owner=your user id)
5. start the bot:

python3 votebot.py

GitHub

GitHub - wcyat/telegram-voting-bot: A simple telegram voting bot based on the python-telegram-bot api.
A simple telegram voting bot based on the python-telegram-bot api. - GitHub - wcyat/telegram-voting-bot: A simple telegram voting bot based on the python-telegram-bot api.