Skip to main content

telepot.aio.Bot convenient subclass, featuring dataset-powered SQLite.

Project description

davtelepot

This project conveniently subclasses third party telepot.aio.Bot, providing many interesting features.

Please note that you need Python3.5+ to run async code

Check requirements.txt for third party dependencies.

Check out help(Bot) for detailed information.

Project folders

data folder

  • *.db: databases used by bots
  • *.log: log files (store log_file_name and errors_file_name in data/config.py module)
  • passwords.py: contains secret information to be git-ignored (e.g. bot tokens)
my_token = 'token_of_bot1'
my_other_token = 'token_of_bot2'
...

Usage

from davtelepot import Bot
from data.passwords import my_token, my_other_token

my_bot = Bot(token=my_token, db_name='my_db')
my_other_bot = Bot(token=my_other_token, db_name='my_other_db')

@my_bot.command('/foo')
async def foo_command(update):
  return "Bar!"

@my_other_bot.command('/bar')
async def bar_command(update):
  return "Foo!"

Bot.run()

Check out help(Bot) for detailed information.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

davtelepot-1.2.4.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

davtelepot-1.2.4-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file davtelepot-1.2.4.tar.gz.

File metadata

  • Download URL: davtelepot-1.2.4.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for davtelepot-1.2.4.tar.gz
Algorithm Hash digest
SHA256 ba8f5883e34fba38ef1f6a40da6f2551d8209004af6dc94a0606c8b5e758e8d0
MD5 61ba5a249177abe15c4482bf61d8b87e
BLAKE2b-256 8f3c015629adffe6053005d98da061fcf628f67486f934c991bdfb4386ba1d63

See more details on using hashes here.

File details

Details for the file davtelepot-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: davtelepot-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for davtelepot-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 db95874501f8d9c61314170c928d205a792b8e43ce69c64c598078d2167bff41
MD5 29331a2b125ee664a915a7d4feb0188a
BLAKE2b-256 93c882ac1de6c449619bcf3279e5add626f4a814bd1845e8284c1cfc7112a8c9

See more details on using hashes here.

Supported by

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