from telegram.ext import Updater, CommandHandler, MessageHandler, Filters with open('1.jpg', 'rb') as f: img = f.read() def start(update, context): """Send a message when the command /start is issued.""" context.bot.send_message(chat_id=update.message.chat_id, text="Мне кажется") context.bot.send_message(chat_id=update.message.chat_id, text="что мы стали забывать") context.bot.send_photo(chat_id=update.message.chat_id, photo=open('1.jpg', 'rb')) def help(update, context): """Send a message when the command /help is issued.""" context.bot.send_message(chat_id=update.message.chat_id, text=update.message.text) def echo(update, context): """Echo the user message.""" update.message.reply_text(update.message.text) def main(): """Start the bot.""" updater = Updater(token="852212950:AAE91nodX8cCKqvK08lXS6txjpSEPq2k-WA", use_context=True) dp = updater.dispatcher dp.add_handler(CommandHandler("yarik_blayt", start)) dp.add_handler(CommandHandler("help", help)) dp.add_handler(MessageHandler(Filters.text, echo)) updater.start_polling() updater.idle() if __name__ == '__main__': main()