This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot/README.md

54 lines
1.7 KiB
Markdown
Raw Normal View History

2014-06-30 12:34:41 +02:00
telegram-bot
============
2014-10-11 12:34:51 +02:00
A telegram bot using https://github.com/vysheng/tg.
Installation
------------
2014-11-17 22:04:24 +01:00
```bash
$ wget http://luarocks.org/releases/luarocks-2.2.0.tar.gz
$ tar -xzvf luarocks-2.2.0.tar.gz
$ cd luarocks-2.2.0/
$ ./configure
$ make && sudo make install
2014-11-17 22:15:03 +01:00
$ sudo luarocks install oauth # You need unzip
2014-11-17 22:04:24 +01:00
```
2014-08-05 11:44:15 +02:00
```bash
2014-10-11 12:38:13 +02:00
# Tested on Ubuntu 14.04, for other OSs check out https://github.com/vysheng/tg#installation
2014-11-19 20:14:30 +01:00
$ sudo apt-get install lua-socket libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev
$ git clone git@github.com:yagop/telegram-bot.git --recursive
2014-10-11 16:27:05 +02:00
$ cd telegram-bot/tg
2014-10-11 12:34:51 +02:00
$ ./configure && make
2014-10-11 16:27:05 +02:00
$ cd .. && ./launch.sh # Will ask you for a phone number & confirmation code.
2014-08-05 11:44:15 +02:00
```
2014-06-30 13:00:30 +02:00
2014-11-22 13:30:46 +01:00
Multimedia
----------
- When user sends image (png, jpg, jpeg) URL download and send it to origin.
- When user sends media (gif, mp4, pdf, etc.) URL download and send it to origin.
- When user sends twitter URL, send text and images to origin. Requieres OAuth Key.
- When user sends youtube URL, send to origin video image.
![http://i.imgur.com/RQYGUuH.png](http://i.imgur.com/RQYGUuHm.png) ![http://i.imgur.com/zqojNhh.png](http://i.imgur.com/zqojNhhm.png)
2014-08-06 01:19:31 +02:00
Command list
2014-10-11 16:27:05 +02:00
------------
2014-08-06 01:19:31 +02:00
```
2014-11-22 13:30:46 +01:00
9gag -> send random image from 9gag
!echo [whatever] -> echoes the msg
!eur [USD] -> EURUSD market value
!uc3m -> Fortunes from Universidad Carlos III
!get (value_name) -> retrieves variables saved with !set
say hello to [name] -> Says hello to someone
!help -> Lists all available commands
!img [topic] -> search image with Google API and sends it
!ping -> bot sends pong
!rae [word] -> Spanish dictionary
!set [value_name] [data] -> Set value
!tw [text] -> Sends a tweet
!version -> Shows the bot version
!weather (city) -> weather in that city (Madrid is default)
2014-08-06 01:19:31 +02:00
```
2014-11-22 13:30:46 +01:00