Can’t quote the original user’s post in the bot

I have a telegram bot, used as a bot for user support. I prescribed the ability to reply to users.
But only text is sent, and I want the reply to come in the form of “text + quote of the original message”. That is, as in the correspondence of two people, when we click “Reply”.

Here is my code:

#The part with importing and initializing tokens is omitted here

def save_user_info(user_id, username):
    conn = sqlite3.connect('users.db')
    cursor = conn.cursor()
    cursor.execute('CREATE TABLE IF NOT EXISTS users (user_id INTEGER PRIMARY KEY, username TEXT)')
    cursor.execute('INSERT OR REPLACE INTO users (user_id, username) VALUES (?, ?)', (user_id, username))
    conn.commit()
    conn.close()
 
@bot.message_handler(content_types=['text'])
def handle_text(message):
    save_user_info(message.chat.id, message.chat.username)
    bot.forward_message(YOUR_TELEGRAM_ID, message.chat.id, message.message_id)
    if message.reply_to_message:
        original_chat_id = message.reply_to_message.forward_from.id
        bot.send_message(original_chat_id, message.text)

def forward_content_to_user(message, user_id):
    if message.content_type == 'photo':
        file_id = message.photo[-1].file_id
        caption = message.caption if message.caption else ''
        bot.send_photo(user_id, file_id, caption=caption)
    elif message.content_type == 'video':
        file_id = message.video.file_id
        caption = message.caption if message.caption else ''
        bot.send_video(user_id, file_id, caption=caption)
    elif message.content_type == 'document':
        file_id = message.document.file_id
        caption = message.caption if message.caption else ''
        bot.send_document(user_id, file_id, caption=caption)
    elif message.content_type == 'audio':
        file_id = message.audio.file_id
        caption = message.caption if message.caption else ''
        bot.send_audio(user_id, file_id, caption=caption)
    elif message.content_type == 'sticker':
        file_id = message.sticker.file_id
        bot.send_sticker(user_id, file_id)
    elif message.content_type == 'voice':
        file_id = message.voice.file_id
        bot.send_voice(user_id, file_id)
    elif message.content_type == 'location':
        latitude = message.location.latitude
        longitude = message.location.longitude
        bot.send_location(user_id, latitude, longitude)
    elif message.content_type == 'contact':
        phone_number = message.contact.phone_number
        first_name = message.contact.first_name
        bot.send_contact(user_id, phone_number, first_name)
 
@bot.message_handler(content_types=['photo', 'video', 'document', 'audio', 'sticker', 'voice', 'location', 'contact'])
def handle_content(message):
    save_user_info(message.chat.id, message.chat.username)
    bot.forward_message(YOUR_TELEGRAM_ID, message.chat.id, message.message_id)
    if message.reply_to_message:
        original_chat_id = message.reply_to_message.forward_from.id
        forward_content_to_user(message, original_chat_id)
 
 
bot.polling()

I tried using reply_to_mesage, but the bot quoted the messages to myself, not the user.

New contributor

Сергей Ижутов is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật