Telepost is a simple gateway to Telegram, which can post messages and respond to primitive requests.
First, get your token from @BotFather.
Then, install it:
$ gem install telepost
Then, use it like this:
require 'telepost' tp = Telepost.new('..token..') Thread.start do tp.run do |chat, msg| tp.post(chat, 'Thanks for talking to me!') end end tp.post(12345, 'How are you?', 'How are you doing?')
All lines you provide to the
post() method will be concatenated
with a space between them.
Or you can pre-configure it to talk to certain list of chats. Your bot has to be an admin of the channel, in order to post there. Here is how you "spam":
tp = Telepost.new('..token..', chats: ['my_channel']) tp.spam('How are you?')
How to contribute
$ bundle update $ bundle exec rake
If it's clean and you don't see any error messages, submit your pull request.