doesnt get last word
This commit is contained in:
parent
50d88007a0
commit
88e0336227
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user