Skip to content

Send and receive Telegram messages from your applications, easily and using your favourite language

License

Notifications You must be signed in to change notification settings

voiser/telegram-for-robots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telegram-for-robots

Installation

Clone this repository

Compile submodule tg

Install some dependencies

  • install luarocks
  • $ luaricks install luasocket

Usage

First launch: log in to telegram

  • $ ./login.sh
  • Enter your phone number (+xx.....) and the received code.
  • The application will close

Launch the server

  • $ ./launch.sh

How does it work?

  • connect to port 4001 to receive all incoming messages in JSON format.
  • connect to port 4002 to send commands (send text, video, etc)

Refer to https://github.com/vysheng/tg for a list of the available commands (or use the help command)

How do I create my bot?

There's a simple example bot written in several languages:

Python 3

  • $ cd python3
  • $ python3 test.py

Ruby

  • $ cd ruby
  • $ ruby test.rb

Groovy

  • $ cd groovy
  • $ groovy test.groovy

Other languages

Feel free to translate the example to other language (and don't forget to send me the pull request)

About

Send and receive Telegram messages from your applications, easily and using your favourite language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published