diff --git a/README.md b/README.md index 8a3a35b..0855edd 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,19 @@ Bot for telegram with [tg](https://github.com/vysheng/tg). ```bash sudo apt-get install lua-socket libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev fortune curl +git clone https://github.com/yagop/telegram-bot.git && cd telegram-bot git submodule update --init --recursive cd tg -./configure -make +./configure && make ../launch.sh ``` Command list ``` -!help : print this help -!ping : bot sends pong +!help : print command list +!ping : bot sends pong !sh (text) : send commands to bash (only privileged users) -!echo (text) : echo the msg +!echo (text) : echo the msg !version : version info !cpu : status (uname + top) !fwd : forward msg @@ -25,6 +25,8 @@ Command list !fortune : print a random adage !weather [city] : weather in that city (Madrid if not city) !9gag : send random image from 9gag +!rae (word): Spanish dictionary +!eur : EURUSD market value !img (text) : search image with Google API and sends it !uc3m : fortunes from Universidad Carlos III ``` diff --git a/bot/bot.lua b/bot/bot.lua index 8aa1acc..be07b71 100644 --- a/bot/bot.lua +++ b/bot/bot.lua @@ -2,7 +2,7 @@ http = require("socket.http") URL = require("socket.url") json = (loadfile "./bot/JSON.lua")() -VERSION = 'v0.4' +VERSION = 'v0.5' function on_msg_receive (msg) @@ -190,6 +190,8 @@ Puedes hacer una donaciĆ³n a la ONG que decidas y ayudar a otras personas.]] !fortune : print a random adage !weather [city] : weather in that city (Madrid if not city) !9gag : send random url image from 9gag +!rae (word): Spanish dictionary +!eur : EURUSD market value !img (text) : search image with Google API and sends it !uc3m : fortunes from Universidad Carlos III]] send_msg(receiver, text, ok_cb, false)