You've already forked Travel-Agent
feat: Reorganized project, added user registration, throttling middleware, help command, profile command
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
__all__ = ("profile",)
|
||||
|
||||
from aiogram.utils.keyboard import ReplyKeyboardBuilder
|
||||
|
||||
|
||||
def profile(text: str | list):
|
||||
builder = ReplyKeyboardBuilder()
|
||||
|
||||
if isinstance(text, str):
|
||||
text = [text]
|
||||
|
||||
[builder.button(text=txt) for txt in text]
|
||||
return builder.as_markup(resize_keyboard=True)
|
||||
@@ -0,0 +1,37 @@
|
||||
__all__ = ("get",)
|
||||
|
||||
from aiogram import types
|
||||
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
||||
|
||||
|
||||
def get():
|
||||
builder = InlineKeyboardBuilder()
|
||||
|
||||
builder.row(
|
||||
types.InlineKeyboardButton(
|
||||
text="👤 Change username",
|
||||
callback_data="profile_change_username",
|
||||
),
|
||||
types.InlineKeyboardButton(
|
||||
text="🔢 Change age",
|
||||
callback_data="profile_change_age",
|
||||
),
|
||||
)
|
||||
builder.row(
|
||||
types.InlineKeyboardButton(
|
||||
text="ℹ️ Change bio",
|
||||
callback_data="profile_change_bio",
|
||||
),
|
||||
types.InlineKeyboardButton(
|
||||
text="📝 Change sex",
|
||||
callback_data="profile_change_sex",
|
||||
),
|
||||
)
|
||||
builder.row(
|
||||
types.InlineKeyboardButton(
|
||||
text="🗺️ Change location",
|
||||
callback_data="profile_change_location",
|
||||
),
|
||||
)
|
||||
|
||||
return builder.as_markup()
|
||||
Reference in New Issue
Block a user