Skip to main content

Tests Status Docker Image CI pre-commit.ci status Code style: black

Development database

The bot needs a database with something in it before most commands do anything interesting. tools/seed_dev_db.py builds one full of invented data - pubs that do not exist, telegram ids far below the range telegram issues, and leistungstage spread around today so /history, /sendreminder and the scheduler's reminder window all have something to find:

python tools/seed_dev_db.py
LEISTUNGSBOT_SQLITE__PATH=$PWD/leistungs_db.dev.sqlite python -m leistungsbot

The same seed always produces the same database, so --seed 7 gives a different but equally repeatable set.

To look inside it, docker compose --profile dev up starts a SQLite browser on https://localhost:3001.

Calendar

The bot can keep a calendar in step with the leistungstage: publishing one creates an entry, closing the poll or moving it to another location updates that entry, and purging it takes the entry away again. It hangs off the database rather than off the commands, so the scheduler closing a poll on its own counts too.

At every start the bot also walks the whole leistungstag table into the calendar, oldest first and in a background thread. That is what gets the leistungstage that predate the calendar in there, and it is safe to repeat - an entry is identified by the leistungstag it belongs to, so it is written over rather than duplicated.

Off unless configured, which is the calendar section:

calendar:
  provider: "google"
  calendar_id: "abc123@group.calendar.google.com"
  credentials: "/data/google-service-account.json"
  timezone: "Europe/Vienna"

credentials is the json key of a google service account - a bot has nobody to click through a consent screen. The service account cannot make a calendar for itself, so make one and share it with the account's email address as "make changes to events".

Google is the only provider so far. leistungsbot/leistungs_calendar.py is the part that does not know that: a second one is a Calendar subclass and a line in from_config.

Intro

This Is A Simple Bot To Create Poll In Channel and Groups
And Also This Is our First Project Too..

Enter you tokens at these are very important VARS:

Without fork you cant deploy so fork it and edit in Bot.py#L22

DEVLOPERS

😎ROHITH ROHITHADITYA
😋PARVAT PARVAT_R

QUICK NOTES

DONT FORGET TO JOIN Venila Bots

LANUGUAGES


>> PY BOT API
>> PYTHON

SUPPORT GROUP



SIMLIFIED READ ME HERE

Read Me --> SIMPLIFIED README

DEPLOY

DEPLOY TO HEROKU

Deploy

RUN IN TERMUX

git clone https://github.com/Botsuniverse/poll-bot
cd poll-bot
python3 Bot.py

RUN IN PYDROID 3

(x) Just Copy The Bot.py to pydroid and Simply Run it

RUN IN YOUR LINUX VPS OR DESKTOP

sudo apt update
sudo apt upgrade
git clone https://github.com/Botsuniverse/poll-bot
python3 Bot.py

RUN THIS IN WINDOWS TERMINAL

git clone https://github.com/BotsUniverse/poll-bot/
cd where_the_fuck_you_stored/poll-bot
py Bot.py

Download files

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

Source Distribution

leistungsbot-1.4.0.tar.gz (4.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

leistungsbot-1.4.0-py3-none-any.whl (5.0 MB view details)

Uploaded Python 3

File details

Details for the file leistungsbot-1.4.0.tar.gz.

File metadata

  • Download URL: leistungsbot-1.4.0.tar.gz
  • Upload date:
  • Size: 4.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.0 Linux/6.17.0-1020-azure

File hashes

Hashes for leistungsbot-1.4.0.tar.gz
Algorithm Hash digest
SHA256 a59695ee1b1c7b3fdea2fa2768579beba1670b7dd0b18be6c1ef2508c9b7309d
MD5 bde7d9542374fe9c9415d595ac7877db
BLAKE2b-256 3f1247d85ee1a9c76253544fae99cbf5b6cb69d6cc88222bea46367ec7037234

See more details on using hashes here.

File details

Details for the file leistungsbot-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: leistungsbot-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.0 Linux/6.17.0-1020-azure

File hashes

Hashes for leistungsbot-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1c37d1e85aea7520ea1f0854b7d0e7eac3e3a7d4a98a399b255df637e219d2b
MD5 22fffa8ac0c7df772f12d111d6856e5f
BLAKE2b-256 d3caf2a2947fafb53fbbfa7f0676d6d4d703a38e3868ee2437635c27bac2447c

See more details on using hashes here.

Release history Release notifications | RSS feed

1.4.2

2 files

1.4.1

2 files

This release

1.4.0 This release

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page