-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.py
25 lines (22 loc) · 834 Bytes
/
user.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from aiogram import Router, F, Bot
from aiogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton, WebAppInfo
from aiogram.filters import Command
from info import TOKEN, ADMIN
from text import hello
router = Router()
bot = Bot(token=TOKEN)
router.message.filter(F.from_user.id != ADMIN)
@router.message(Command("start"))
async def start(message: Message):
inline = InlineKeyboardMarkup(
inline_keyboard=[
[
InlineKeyboardButton(text="Товары в наличии", web_app=WebAppInfo(url="https://teledevtech.github.io/flip/head.html"))
]
]
)
a = await message.answer(
text=f"{hello(message.from_user.first_name)}",
reply_markup=inline
)
await bot.delete_message(chat_id=message.from_user.id, message_id=a.message_id - 1)