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.
2015-06-11 17:11:00 +02:00
|
|
|
do
|
|
|
|
|
|
|
|
local function get_url()
|
|
|
|
local url = 'http://yagyuu.moe'
|
|
|
|
local res,code = http.request(url)
|
|
|
|
if code ~=200 then return "Fehler beim Abrufen von yagyuu.moe" end
|
|
|
|
local photo_url = string.match(res, "<img src%=\"(.-)\" alt")
|
|
|
|
local photo_url = url..'/'..photo_url
|
|
|
|
return photo_url
|
|
|
|
end
|
|
|
|
|
|
|
|
local function run(msg, matches)
|
|
|
|
local photo_url = get_url()
|
|
|
|
local receiver = get_receiver(msg)
|
|
|
|
send_photo_from_url(receiver, photo_url)
|
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
|
|
|
description = "Postet ein Bild von yagyuu.moe",
|
2016-06-22 13:59:06 +02:00
|
|
|
usage = "#yagyuu",
|
|
|
|
patterns = {"^#[Yy][Aa][Gg][Yy][Uu][Uu]$"},
|
2015-06-11 17:11:00 +02:00
|
|
|
run = run
|
|
|
|
}
|
|
|
|
-- Created by github.com/Brawl345
|
|
|
|
end
|