Kleine fixes
This commit is contained in:
parent
1e283a0311
commit
8412921315
@ -1,15 +1,9 @@
|
|||||||
local function run(msg, matches)
|
local function run(msg, matches)
|
||||||
local base = "http://dogr.io/"
|
local BASE_URL = "http://dogr.io/"
|
||||||
local path = string.gsub(matches[1], " ", "%%20")
|
local path = string.gsub(matches[1], " ", "%%20")
|
||||||
local url = base .. path .. '.png?split=false&.png'
|
local url = BASE_URL..path..'.png?split=false&.png'
|
||||||
local urlm = "https?://[%%%w-_%.%?%.:/%+=&]+"
|
local receiver = get_receiver(msg)
|
||||||
|
send_photo_from_url(receiver, url)
|
||||||
if string.match(url, urlm) == url then
|
|
||||||
local receiver = get_receiver(msg)
|
|
||||||
send_photo_from_url(receiver, url)
|
|
||||||
else
|
|
||||||
return 'Konnte kein Bild mit "' .. matches[1] .. '" erstellen.'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -159,7 +159,7 @@ local function cron()
|
|||||||
else
|
else
|
||||||
content = ''
|
content = ''
|
||||||
end
|
end
|
||||||
text = text..'[RSS] '..title..'\n'..content..'\n\n'..link..'\n\n'
|
text = text..'[#RSS] '..title..'\n'..content..'\n\n'..link..'\n\n'
|
||||||
end
|
end
|
||||||
if text ~= '' then
|
if text ~= '' then
|
||||||
local newlast = newentr[1].id
|
local newlast = newentr[1].id
|
||||||
|
Reference in New Issue
Block a user