Last active
March 27, 2020 09:45
-
-
Save valenso/39c46a184d3eecf8702527b4873ef79e to your computer and use it in GitHub Desktop.
Bots Factory, #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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