я читал этот раздел. Мне надо, чтобы бот отвечал именно так после команды /cup. А просто текст он должен обрабатывать по другому.
@bot.message_handler(commands=['cup'])
def command_start(m):
... # тут твой код
# default handler for every other text
@bot.message_handler(func=lambda message: True, content_types=['text'])
def command_default(m):
# this is the standard reply to a normal message
bot.send_message(m.chat.id, "I don't understand \"" + m.text + "\"\nMaybe try the help page at /help")
def test_send_message_with_markdown(self):
tb = telebot.TeleBot(TOKEN)
markdown = """
*bold text*
_italic text_
[text](URL)
"""
ret_msg = tb.send_message(CHAT_ID, markdown, parse_mode="Markdown")
assert ret_msg.message_id
bot.send_message(CHAT_ID, "*Здесь должен быть жирный шрифт*", parse_mode= "Markdown")