Skip to content

Library - aiogram. Multilevel keyboard with default buttons. NOT inline

Notifications You must be signed in to change notification settings

Chenger1/Telegram-MultilevelKeyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram-MultilevelKeyboard

Example of creating multilevel keyboard with default buttons(ReplyMarkup) - not inline

The main idea is to put menu levels to dictionary, iterate over it to find particular level - and return matched keyboard. If you want to test it:

  1. Clone from repository
  2. Create file config.py and put your bot token to variable 'Token'. Or just but token to bot

Keyboard can be either regular ReplyKeyboardMarkup or function(coroutine). For example, if we want to have different keyboard for different user groups. We can pass user_id or status to dispatcher and make all necessary checks.

Look at this project for more advanced example of using this idea: https://github.com/Chenger1/SwipeTelegramBot/blob/main/keyboards/default/dispatcher.py

Repository opens for proposals. I know that algorithm can be improved, so welcome

About

Library - aiogram. Multilevel keyboard with default buttons. NOT inline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages