Answer the question
In order to leave comments, you need to log in
Sending a message to Telegram (Telebot)?
I work in Python with the telebot library.
And so, there are buttons in the bot, I need that when the user clicks on the button, the bot writes to him like: leave a review or a suggestion, and so that this message that the user wrote is resent to me personally, which I can’t do ..
import telebot
from telebot import types
token = 'token'
bot = telebot.TeleBot(token)
@bot.message_handler(commands=['start'])
def start(m):
markup = types.ReplyKeyboardMarkup(resize_keyboard=True)
markup.row(' 1', '2')
markup.row('Review', '4')
msg=bot.send_message(m.chat.id,'Select item:',reply_markup=markup)
@bot.message_handler(func=lambda message :
if m.text == 'review':
bot.send_message(m.chat.id, 'If you offer cooperation or want to help one-sidedly, then write here. Thank you.')
............
if __name__ == '__main__':
bot.polling(none_stop=True)
What to add to do as I described???
Answer the question
In order to leave comments, you need to log in
What exactly doesn't work?
In order for the message to come to you in a personal, you need to replace m.chat.id
the ID with your personal telegram chat.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question