Answer the question
In order to leave comments, you need to log in
How can a bot delete a photo that he sent?
Hello, I am a beginner developer. I have a problem, the photo remains and freezes forever -
I want to make it so that the photo remains until the user presses a button on the keyboard. I'll attach the source for everyone -
#Игра про панчера
if call.data == "pan4er":
pan4er = types.InlineKeyboardMarkup()
pan4er_button1 = types.InlineKeyboardButton(text="Ударить Панчера по ебалу", callback_data="ebalo")
pan4er_button2 = types.InlineKeyboardButton(text="Оторвать панчеру хуй", callback_data="xuy")
pan4er_button3 = types.InlineKeyboardButton(text="❌Отмена❌", callback_data="otmena")
pan4er.add(pan4er_button1, pan4er_button2, pan4er_button3)
bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="Игра называется - Панчер еблан. Хорошой игры!", reply_markup=pan4er)
#-Ебало панчера
if call.data == "ebalo":
ebalo = types.InlineKeyboardMarkup()
ebalo_button1 = types.InlineKeyboardButton(text="Ударить Панчера по ебалу", callback_data="ebalo")
ebalo_button2 = types.InlineKeyboardButton(text="Оторвать панчеру хуй", callback_data="xuy")
ebalo_button3 = types.InlineKeyboardButton(text="❌Отмена❌", callback_data="otmena")
ebalo.add(ebalo_button1, ebalo_button2, ebalo_button3)
bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="Вы ударили Панчера по ебалу и сломали ему нос", reply_markup=ebalo)
bot.send_photo(call.message.chat.id, open('C:/Users/User/Desktop/Skytach BOT 2.0/Фотографии/Pan4er Ебало.png', 'rb'));
I'm waiting for open answers, if it's not difficult to provide a line of code Ps - Do not pay attention to phrases in the code
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question