doesnt get last word

This commit is contained in:
yago 2014-11-04 23:06:26 +01:00
parent 50d88007a0
commit 88e0336227
2 changed files with 5 additions and 14 deletions

View File

@ -1,11 +1,7 @@
function send_file_from_url (msg, url)
last = string.get_last_word(ul)
file = download_to_file(last)
send_document(get_receiver(msg), file, ok_cb, false)
end
function run(msg, matches)
send_file_from_url(msg, matches[1])
file = download_to_file(matches[1])
send_document(get_receiver(msg), file, ok_cb, false)
end
return {

View File

@ -1,13 +1,8 @@
function send_image_from_url (msg)
last = string.get_last_word(msg.text)
file = download_to_file(last)
print("I will send the image " .. file)
send_photo(get_receiver(msg), file, ok_cb, false)
end
function run(msg, matches)
send_image_from_url(msg)
file = download_to_file(matches[1])
print("I will send the image " .. file)
send_photo(get_receiver(msg), file, ok_cb, false)
end
return {