'Text + image not working with telegram bot
Having troubles with sending image with text. Instead of actual image, I'm just getting the path to it. I wonder if someone knows what is the problem in my code. Instead of the path I want an actual image
import telebot
from telebot import types
bot = telebot.TeleBot("token")
@bot.message_handler(commands = ['start'])
def button(message):
markup = types.InlineKeyboardMarkup(row_width=2)
item_4 = types.InlineKeyboardButton('q1', callback_data ='da')
item_3 = types.InlineKeyboardButton("asdas", callback_data = 'net')
markup.add(item_4, item_3)
img = r'C:\Python\k123s.jpg'
text = 'Your profile!'
bot.send_message(message.chat.id, f'{text}\n{img}', reply_markup = markup)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

