• This repository has been archived on 24/Jan/2024
  • Stars
    star
    138
  • Rank 264,508 (Top 6 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

💡 The ultimate vote and poll bot for creating, sharing and evaluating polls inside of Telegram

Ultimate Pollbot (@ultimate_pollbot)

MIT Licence

Alt Text

⚠️ ⚠️ ⚠️ State of the project ⚠️ ⚠️ ⚠️

The project is no longer actively maintained! I try to bump dependencies on a regular basis, but I won't review or accept any new pull requests!

If you started a successful fork of this repository that has been maintained over a longer period of time, feel free to contact me. I'll then point to your fork :).

⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️

Introduction

Deciding where you and your friends are going for lunch today can be a real hassle... Or, for instance, deciding which games should be played at the next LAN-Party.

Since no other telegram poll/vote bot offered the full feature set my friends and I needed, I decided to write the ULTIMATE pollbot. A bot which combines all good features of all existing bots and even stuff beyond that.

Features

The Ultimate Pollbot delivers a full set of well-tested and battle proven features. It's capable of handling hundreds of voters for a single poll, while offering a high customizability and a wide range of different poll types to choose from.

Here is a list of the most important features:

Poll types

This bot has 6 different vote modi. Each mode is useful for various scenarios. Choose wisely.

  • Single vote: User get a single vote to allot
  • Doodle: Users can vote with yes, no and maybe for each option.
  • Block vote: Users can vote without restriction, but only one vote per option.
  • Limited vote: Each user gets X votes for distribution, but only one vote per option.
  • Cumulative vote: Every user gets X votes they can distribute as they like.
  • Unlimited votes (Also called the shopping list): Every user can vote as often as they like, pretty much like a distributed shopping list.

Anonymity settings

Polls can be configured to be anonymous, with the result that names of users are not visible. Polls can be made anonymous subsequently, but as soon as a poll is anonymous it stays that way forever!

Further it's possible to hide the results of the poll until it gets closed. As soon as such a poll is closed, the results will be visible. Beware!: such a poll cannot be reopened.

Poll Management

  • Addition and removal of options
  • Allow other users to add new options
  • Polls can be closed
  • Polls can be reopened unless the poll is configured to hide the results until it has been closed.
  • Polls can be completely deleted, which means that all non-forwarded occurrences of the poll will be removed.
  • Polls can be reseted (Delete all votes). Poll needs to be closed first
  • Polls can be cloned (New poll with same options, but without votes). Poll needs to be closed first

Misc

  • Internationalization
  • Polls sync between groups in real time.
  • Polls can be shared via link. This allows other users to spread the poll to arbitrary groups.
  • A date picker for easier creation of poll options
  • Specify a due date, at which the poll will be automatically closed.
  • Activate notifications in chats to notify users that the poll will close soon.

Sorting and Appearance

  • Results can be displayed in a detailed or summarized manner.
  • The percentage bar in the vote message can be disabled.
  • The bot allows to configure the sorting of the option list and the user list for each option.
  • Users can be sorted by vote date or username. Options can be sorted by highest percentage, name or by the order they've been added.

Acknowledgements

Packaging status Thanks to Sentry for providing the project with a sponsored plan (which has super generous quotas!).

Thanks to Lokalise for providing my projects with a free license for open-source development!

Thanks to the Turkish translator:

Thanks to the Polish translator:

Thanks to all Italian translators:

Thanks to all Spanish translators:

Thanks to all Brazilian Portuguese translators:

Thanks to all German translators:

Thanks to the Catalan translator:

Thanks to the Czech translator:

  • Ignac (IgnacRR)

Commands

/start          Start the bot
/settings       Open the user settings menu
/create         Create a new poll
/list           List all active polls and manage them
/list_closed    List all closed polls and manage them
/notify         Activate notifications in a external chats
/help           Display the help

Installation and Starting

Dependencies:

  • Poetry to manage and install dependencies.
  • Just for convience.
  • Ultimate Pollbot uses Postgres. Make sure the user has write/read rights. You can use the provided docker-compose file to set up a local development environment.
  1. Clone the repository:
git clone [email protected]:nukesor/ultimate-poll-bot pollbot && cd pollbot
  1. Execute just setup to install all dependencies.
  2. Either start the poll bot once with just run or copy the pollbot.toml manually to ~/.config/pollbot.toml and adjust all necessary values. On Windows, the tilde (~) will substitute to your home directory, usually at C:\Users\your.name\.config\pollbot.toml.
  3. Run just initdb to initialize the database (or recreate it, if necessary) and set the migration stamp to the newest alembic head.
  4. Start the bot by running just run.

Upgrading the Database

This is how you upgrade:

  1. Stop the bot
  2. git pull
  3. poetry run alembic upgrade head to run migrations on your database
  4. Start the bot

Botfather Commands

start - Start the bot
stop - Stop the bot
delete_me - Remove me from the bot. Forever
settings - Open the user settings menu
create - Create a new poll
cancel - Cancel poll creation
list - List all active polls and manage them
list_closed - List all closed polls and manage them
notify - Activate notifications in external chats
help - Show the help text

More Repositories

1

pueue

🌠 Manage your shell commands.
Rust
4,812
star
2

comfy-table

🔶 Build beautiful terminal tables with automatic content wrapping
Rust
911
star
3

sticker-finder

⚡ A telegram bot for searching all the stickers (just like @gif).
Python
99
star
4

archivebot

💾 A telegram bot for backing up and collecting all kinds of media.
Python
98
star
5

webhook-server

Trigger program/script execution on your server via http calls. Ships with a scheduler, templating and Github's CI support
Rust
43
star
6

libwifi

📦 A library for parsing IEEE 802.11 frames
Rust
42
star
7

inter-struct

❓ Experimental autogenerated traits for operations between arbitrary structs (in the same crate).
Rust
19
star
8

hetznerbot

📲 Get the newest hetzner server offers right to your telegram chat.
Python
18
star
9

gitalizer

A git/github repository data collector to analyse privacy implications of exposing Git metadata
Python
14
star
10

encarne

📺 Reencode all your movies to h.265
Python
11
star
11

geil

🚀 A tool to update your repositories and for keeping them clean
Rust
10
star
12

pueue-webhook-server

A webhook server that schedules commands on request. Uses Pueue as executor backend.
Rust
9
star
13

selfhosted-gaming

A collection of installation and configuration instructions for selfhosted game servers
HTML
8
star
14

scripts

A bunch of shell scripts and small rust programs for my personal use
Rust
7
star
15

wifitify

A research project for tracking devices via WiFi and sending notifications.
Rust
6
star
16

mixxx-library-exporter

A small converter tool, which exports a mixxx library into other formats.
Rust
6
star
17

dotfiles

Config stuff
Lua
6
star
18

setup

Shell
4
star
19

roflcopter

Do you want a lot of ROFLCOPTER on your screen? Then this is for you.
Rust
4
star
20

struct-merge

Generate code for merging structs
Rust
3
star
21

game-server-management

Management scripts for some of my self-hosted game servers
Rust
3
star
22

game-saver

Save and restore games that don't want to be restored
Rust
3
star
23

Media-bot

A telegram bot for viewing media from reddit links inside the messenger
Python
3
star
24

rust-boilerplate

Rust
2
star
25

python-mini-tutorial

A small mini tutorial to get a quick impression of the languages syntax and base features
Python
2
star
26

spacesurvival

A collaborative mmo space survival game
Python
2
star
27

Arrrsync

Secure rsync and file exploration in python. An extra `r` for extra security.
Python
2
star
28

blocker

Simple convenience layer around airmon-ng for deauthentication attacks.
Rust
2
star
29

thesis

Privacy implications of exposing git metadata
TeX
2
star
30

advent_of_code

Advent of code challenges
Rust
1
star
31

rocket-diesel-rest-boilerplate

Rust
1
star
32

ShapeRape

Our repository for the global gamejam 2014
C
1
star
33

chef-cookbook

LOL
HTML
1
star
34

music-organizer

A small program, which helps me organize my music library.
Rust
1
star
35

notification-bot

Kleinanzeigen scraper
Python
1
star
36

adminbot

This is my personal user-bot that helps me moderating my bots
Python
1
star
37

collatz_conjecture

A little playground for high performance computing with Rust based on the collatz conjecture.
Rust
1
star
38

gitalysis

The data mining and visualization code for metadata collected by gitalizer
Python
1
star
39

mixxx-controller-scripts

Custom script for my DJ controller
JavaScript
1
star