-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkeyboard.py
More file actions
18 lines (12 loc) · 776 Bytes
/
keyboard.py
File metadata and controls
18 lines (12 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from aiogram.types import KeyboardButton,ReplyKeyboardMarkup
import logging
log=logging.getLogger()
is_for_admin=ReplyKeyboardMarkup(keyboard=[[KeyboardButton(text="Yes"),KeyboardButton(text="No"),],],resize_keyboard=True,)
main_panel=ReplyKeyboardMarkup(keyboard=[[KeyboardButton(text="Print barcode ⌨")]])
main_panel_admin=ReplyKeyboardMarkup(keyboard=[[KeyboardButton(text="Print barcode ⌨"),KeyboardButton(text="Make broadcast📢"),KeyboardButton(text="Make admin⏫"),KeyboardButton(text="Unmake admin⏬"),],],resize_keyboard=True,)
async def generate_list_keyboard(usernames:list):
list_keyboard=[]
for user in usernames:
list_keyboard.append([KeyboardButton(text=user)])
log.info(f"List of keyboard generated!")
return list_keyboard