import telebot
import random
from telebot import types
sl= 'E: \ telegrambot \ 1.jpg'
sk= {
    '1': 'text1',
    '2': 'text2',
    '3': 'text3',
    '4': 'text4',
    '5': 'text5',
    '6': 'text6',
    '7': 'text7',
    '8': 'text8',
    '9': 'text9'
bot= telebot.TeleBot ('TOKEN');
def callback (call):
    if call.message:
        if call.data== 'yes':
            bot.send_photo (messege.chat.id, open (sl))
        elif call.data== 'no':
            bot.edit_message_text (chat_id= call.message.chat.id, message_id= call.message.id, text= sk [str (random.randint (1,9))])
bot.polling (none_stop= True, interval= 0)

Writes an error bot.send_photo (messege.chat.id, open (sl)) NameError: name 'messege' is not defined

your spelling is not correct, change it to message, and + you have already entered the callback, so write call before message, you should get call.message.chat.id

DisanD_082021-12-30 19:15:12