@bot.message_handler(content_types=['text'])
def text(message):
markup = telebot.types.InlineKeyboardMarkup()
btn = telebot.types.InlineKeyboardButton(text='Buy', callback_data='buy')
markup.add(btn)
bot.send_photo(chat_id=message.chat.id, photo=open('../jpg.jpg', 'rb'), caption='Текст под картинкой', reply_markup=markup)
from datetime import datetime
a = datetime(year=2020, month=1, day=1, hour=9, minute=0, second=0)
b = datetime(year=2020, month=1, day=1, hour=12, minute=0, second=0)
c = datetime(year=2020, month=1, day=1, hour=18, minute=0, second=0)
if a < c < b:
print('In range')
else:
print('Out of range')