Skip to content

ASzc/telegram-rcv-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Ranked Poll Bot

Overview

This the source code of @RankedPollBot; a poll bot for the Telegram messaging service. It's written in Python 3, and is ASL v2 licensed.

Ranked Poll Bot provides polls where you can rank each option instead of just choosing one. This is called Ranked Choice Voting or Instant Runoff. Since voters don't need to guess how everyone else will vote, it captures the voters' preference more accurately than a conventional First Past the Post poll.

Usage

There's probably no need for you to deploy this server yourself. To use the bot, just talk to it on Telegram.

Install

firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="149.154.160.0/20" port protocol="tcp" port="8443" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="91.108.4.0/22" port protocol="tcp" port="8443" accept'
firewall-cmd --reload
dnf install redis npm ImageMagick google-noto-emoji-color-fonts python3-pyyaml
systemctl enable redis
systemctl start redis
useradd rcv
su - rcv
pip3 install --user aiogram aioredis cryptography
echo "prefix=${HOME}/.local" >> ~/.npmrc
npm install -g svg-sankey
git clone https://github.com/ASzc/telegram-rcv-bot.git
cd telegram-rcv-bot
vim config.ini
exit
curl -Lo /usr/lib/systemd/system/rcv.service https://raw.githubusercontent.com/ASzc/dawbrn/master/rcv.service
systemctl enable rcv
systemctl start rcv

About

Ranked choice voting for Telegram messenger

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages