Tishka17 / aiogram_dialog

GUI framework on top of aiogram
https://aiogram-dialog.readthedocs.io
Apache License 2.0
671 stars 103 forks source link

Best solution for creating different count of buttons #392

Closed byBenPuls closed 5 months ago

byBenPuls commented 5 months ago

In my code i want to using cycles for where i can create a specific count of buttons

async def count_of_buttons(count_: int):
    list_ = []
    for i in range(1, count_ + 1):
        list_.append(
            Button(Const(f'{i}'), id=f'{i}', on_click=go_clicked)
        )
    return list_

But how i can using function in window?