Answer the question
In order to leave comments, you need to log in
How to accept text from the keyboard of the Telegram Bot Ruby as input?
How to make a person enter text from the keyboard (do not select the proposed option, namely enter) and then have the opportunity to work with this text?
Answer the question
In order to leave comments, you need to log in
You listen to everything through regular expressions. What is the difficulty?
require 'telegram/bot'
token = 'YOUR_TELEGRAM_BOT_API_TOKEN'
Telegram::Bot::Client.run(token) do |bot|
bot.listen do |message|
case message.text
when /*сюда свою регулярку/
do something
end
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question