Skip to content

Instantly share code, notes, and snippets.

@valenso
Last active March 27, 2020 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valenso/39c46a184d3eecf8702527b4873ef79e to your computer and use it in GitHub Desktop.
Save valenso/39c46a184d3eecf8702527b4873ef79e to your computer and use it in GitHub Desktop.
Bots Factory, #1
require 'telegram/bot'
token = "1112581529:AAGjan2zAczJ8Yx5RWvJsTmAvwCaNTpJS-U"
Telegram::Bot::Client.run(token) do |bot|
bot.listen do |message|
text = ["😂","😎","🥳"].sample
bot.api.send_message(chat_id: message.chat.id, text: text)
end
end
source 'https://rubygems.org'
gem 'telegram-bot-ruby'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment