Skip to main content

Simple calendar for telegram bot (aiogram v2.x)

Project description

About package

This allows you to add a calendar to your telegram bot.

Get Started

Install package

pip install SACalendar 

Simple example

from aiogram.contrib.fsm_storage.memory import MemoryStorage
from aiogram.types import Message, CallbackQuery
from CalendarBot import CalendarBot

bot = Bot(token=BOT_TOKEN)
dp = Dispatcher(bot, storage=MemoryStorage())
my_calendar = CalendarBot()

@dp.message_handler(CommandStart())
async def start_working_with_bot(message: Message) -> None:
    await message.answer('YAHOO!', reply_markup=await my_calendar.enable())

@dp.callback_query_handler(my_calendar.callback.filter())
async def birthday_simple_calendar(call: CallbackQueryt) -> None:
    pass

Demo

Description

This simple calendar supports 2 languages RU and EN. To select a language, use:

my_calendar = CalendarBot(language='EN')

Also, to improve the quality of the calendar display, you can transfer your time zone (default UTC)

my_calendar = CalendarBot(tz='Europe/Vienna')

Try it in action

-> @my_Yuuko_bot

Project details


Download files

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

Source Distribution

SACalendar-0.0.5.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file SACalendar-0.0.5.tar.gz.

File metadata

  • Download URL: SACalendar-0.0.5.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for SACalendar-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2fb31d462abb417542a3299ac80ef1f1ce6fd56650ebdb878ddeac3341777353
MD5 c60dc9e842b5de3a6eba06fa8dff1b72
BLAKE2b-256 349d8c3a4c724660cb486e202beb3df8319b7a84b7fbf7960bae294a65c04fc8

See more details on using hashes here.

Supported by

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