merge user, admin and common dialogs to one folder
This commit is contained in:
19
app/bot/dialogs/flows/start/dialogs.py
Normal file
19
app/bot/dialogs/flows/start/dialogs.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from aiogram_dialog import Dialog, Window
|
||||
from aiogram_dialog.widgets.kbd import Button, Start
|
||||
from aiogram_dialog.widgets.text import Const, Format
|
||||
|
||||
from app.bot.dialogs.flows.profile.dialogs import ProfileSG
|
||||
from app.bot.dialogs.widgets.getters import is_admin, username_getter
|
||||
|
||||
from .states import StartSG
|
||||
|
||||
start_dialog = Dialog(
|
||||
Window(
|
||||
Format("Привет, {username}"),
|
||||
Button(Const("события"), id="events"),
|
||||
Button(Const("создать событие"), id="create_event", when="is_admin"),
|
||||
Start(Const("профиль"), id="profile", state=ProfileSG.profile),
|
||||
getter=[username_getter, is_admin],
|
||||
state=StartSG.start,
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user