@bot.message_handler(content_types=['photo'])
def get_photo_text(message):
photo = message.photo[-1].file_id
bot.send_photo(message.chat.id, photo, message.caption, caption_entities=message.caption_entities )
@bot.message_handler(content_types=['photo'])
def get_photo_text(message):
photo = message.photo[-1].file_id
bot.send_photo(message.chat.id, photo, message.caption_entities)
@bot.message_handler(content_types=['photo'])
def get_photo_text(message):
photo = message.photo[-1].file_id
bot.send_photo(message.chat.id, photo, '<b>message.caption</b>', parse_mode = 'html')
import telebot
import time
bot = telebot.TeleBot('токен')
CHAT_ID = 'id чата'
@bot.message_handler(commands=['start'])
def start(message):
while True:
bot.send_message(CHAT_ID, 'ваше сообщение')
time.sleep(1) # тут пишем в интервал в секундах
bot.polling(none_stop=True)
@bot.message_handler(commands=['start'])
def start(message):
bot.send_message(CHAT_ID, 'ваше сообщение')
@bot.message_handler(commands=['start'])
def start(message):
bot.send_message(CHAT_ID, 'ваше сообщение')
Спасибо большое