path_list = ["image1.png", "image2.png", "image3.png"] # Это имена файлов в папке с ботом
def callback_worker(call):
if call.data == "rand":
random_path = random.choice(path_list)
with open(random_path, "rb") as file:
bot.send_photo(call.message.chat.id, file.read())