Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.21 KB

README.md

File metadata and controls

50 lines (30 loc) · 1.21 KB

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=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