We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to be able to share inforamtion to certain users. Is it safe enough to do something like:
Telegram::Bot::Client.run(token) do |bot| bot.listen do |message| case message.text if message.from.id == "My super secret id" when '/start' puts message.from.inspect bot.api.sendMessage(chat_id: message.chat.id, text: "Hello, #{message.from.first_name}") when '/stop' bot.api.sendMessage(chat_id: message.chat.id, text: "Bye, #{message.from.first_name}") end else bot.api.sendMessage(chat_id: message.chat.id, text: "Not authorized") end end end
Any better/safer way?
The text was updated successfully, but these errors were encountered:
I don't see any issues with your approach.
Sorry, something went wrong.
No branches or pull requests
I want to be able to share inforamtion to certain users.
Is it safe enough to do something like:
Any better/safer way?
The text was updated successfully, but these errors were encountered: