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
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
SACalendar-0.0.2.tar.gz
(4.8 kB
view details)
File details
Details for the file SACalendar-0.0.2.tar.gz.
File metadata
- Download URL: SACalendar-0.0.2.tar.gz
- Upload date:
- Size: 4.8 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb359ac0d7460fb20ea057a822cb7b563f916726d7084c2ca405008c65eb36a4
|
|
| MD5 |
a3ceb3d23647820c0568caf19582be79
|
|
| BLAKE2b-256 |
26b7fb0a698549627e9cf1c497377e581560119fd39453a6bacd51cdce6e1de6
|