-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
78 lines (63 loc) · 2.75 KB
/
main.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import text
from aiogram import Bot, Dispatcher, executor, types
from aiogram.types import ReplyKeyboardRemove, \
ReplyKeyboardMarkup, KeyboardButton, \
InlineKeyboardMarkup, InlineKeyboardButton
from aiogram.dispatcher.filters import Text
API_TOKEN = '*'
bot = Bot(token=API_TOKEN)
dp = Dispatcher(bot)
#клавиатура с кнопками
keyboard = types.ReplyKeyboardMarkup()
button_1 = types.KeyboardButton(text="Улица")
keyboard.add(button_1)
button_2 = "Клуб"
keyboard.add(button_2)
button_3 = "Транспорт"
keyboard.add(button_3)
button_4 = "Кафе"
keyboard.add(button_4)
button_5 = "ТЦ"
keyboard.add(button_5)
button_6 = "Парк"
keyboard.add(button_6)
button_7 = "Пляж"
keyboard.add(button_7)
button_8 = "Директ"
keyboard.add(button_8)
button_9 = "Разное"
keyboard.add(button_9)
#Обработка входящих сообщений
@dp.message_handler(commands=['start'])
async def send_welcome(message: types.Message):
await message.answer("Привет!\nЭто пикап-бот от Романа!\n"
"Выбери место, а я тебе скину фразу для знакомства.\n😜", reply_markup=keyboard)
@dp.message_handler(Text(equals="Улица"))
async def with_puree(message: types.Message):
await message.answer(text.answer('Улица'), reply_markup=keyboard)
@dp.message_handler(Text(equals="Клуб"))
async def with_puree(message: types.Message):
await message.answer(text.answer('Клуб'), reply_markup=keyboard)
@dp.message_handler(Text(equals="Транспорт"))
async def with_puree(message: types.Message):
await message.answer(text.answer('Транспорт'), reply_markup=keyboard)
@dp.message_handler(Text(equals="Кафе"))
async def with_puree(message: types.Message):
await message.answer(text.answer('Кафе'), reply_markup=keyboard)
@dp.message_handler(Text(equals="ТЦ"))
async def with_puree(message: types.Message):
await message.answer(text.answer('ТЦ'), reply_markup=keyboard)
@dp.message_handler(Text(equals="Парк"))
async def with_puree(message: types.Message):
await message.answer(text.answer('Парк'), reply_markup=keyboard)
@dp.message_handler(Text(equals="Пляж"))
async def with_puree(message: types.Message):
await message.answer(text.answer('Пляж'), reply_markup=keyboard)
@dp.message_handler(Text(equals="Директ"))
async def with_puree(message: types.Message):
await message.answer(text.answer('Директ'), reply_markup=keyboard)
@dp.message_handler(Text(equals="Разное"))
async def with_puree(message: types.Message):
await message.answer(text.answer('Разное'), reply_markup=keyboard)
if __name__ == '__main__':
executor.start_polling(dp, skip_updates=True)