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 hashes)

Uploaded Source

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