mirror of
https://github.com/KUlishevgeniy/c22712.git
synced 2026-09-24 08:00:22 +00:00
bot_database.py
This commit is contained in:
@@ -40,22 +40,22 @@ def start(message):
|
|||||||
def handle_text(message):
|
def handle_text(message):
|
||||||
if (message.text.strip() == "Лучший скейтборд этого сезона"):
|
if (message.text.strip() == "Лучший скейтборд этого сезона"):
|
||||||
i = random.choice(array)
|
i = random.choice(array)
|
||||||
ans = f'Название: {i[2]}\nЦена: {i[3]}\n'
|
inf = f'Название: {i[2]}\nЦена: {i[3]}\n'
|
||||||
bot.send_message(message.chat.id, ans)
|
bot.send_message(message.chat.id, inf)
|
||||||
bot.send_photo(message.chat.id, open(i[4], 'rb'))
|
bot.send_photo(message.chat.id, open(i[4], 'rb'))
|
||||||
cat = open('kotik.webm', 'rb')
|
cat = open('kotik.webm', 'rb')
|
||||||
bot.send_video(message.chat.id, cat)
|
bot.send_video(message.chat.id, cat)
|
||||||
elif (message.text.strip() == "Предложение дня"):
|
elif (message.text.strip() == "Предложение дня"):
|
||||||
i = random.choice(array)
|
i = random.choice(array)
|
||||||
ans = f'Название: {i[2]}\nЦена: {i[3]}\n'
|
inf = f'Название: {i[2]}\nЦена: {i[3]}\n'
|
||||||
bot.send_message(message.chat.id, ans)
|
bot.send_message(message.chat.id, inf)
|
||||||
bot.send_photo(message.chat.id, open(i[4], 'rb'))
|
bot.send_photo(message.chat.id, open(i[4], 'rb'))
|
||||||
cat = open('kotik.webm', 'rb')
|
cat = open('kotik.webm', 'rb')
|
||||||
bot.send_video(message.chat.id, cat)
|
bot.send_video(message.chat.id, cat)
|
||||||
elif (message.text.strip() == "Выбор редакции нашей компании"):
|
elif (message.text.strip() == "Выбор редакции нашей компании"):
|
||||||
i = random.choice(array)
|
i = random.choice(array)
|
||||||
ans = f'Название: {i[2]}\nЦена: {i[3]}\n'
|
inf = f'Название: {i[2]}\nЦена: {i[3]}\n'
|
||||||
bot.send_message(message.chat.id, ans)
|
bot.send_message(message.chat.id, inf)
|
||||||
bot.send_photo(message.chat.id, open(i[4], 'rb'))
|
bot.send_photo(message.chat.id, open(i[4], 'rb'))
|
||||||
cat = open('kotik.webm', 'rb')
|
cat = open('kotik.webm', 'rb')
|
||||||
bot.send_video(message.chat.id, cat)
|
bot.send_video(message.chat.id, cat)
|
||||||
|
|||||||
Reference in New Issue
Block a user