new plugins yagyuu and riko
by @Brawl345
This commit is contained in:
parent
782020e61f
commit
2610903759
Binary file not shown.
Before Width: | Height: | Size: 33 KiB |
25
plugins/riko.lua
Normal file
25
plugins/riko.lua
Normal file
@ -0,0 +1,25 @@
|
||||
do
|
||||
|
||||
local function get_url()
|
||||
local url = 'http://riko.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 riko.moe",
|
||||
usage = "/riko",
|
||||
patterns = {"^/[R|r]iko$"},
|
||||
run = run
|
||||
}
|
||||
-- Created by github.com/Brawl345
|
||||
end
|
@ -16,10 +16,6 @@ function run(msg, matches)
|
||||
send_photo(get_receiver(msg), "pictures/senrankagura/hanzouacademy/katsuragi.jpg", ok_cb, false)
|
||||
end
|
||||
|
||||
if string.starts(msg.text, '/yagyuu') or string.starts(msg.text, "/Yagyuu") then
|
||||
send_photo(get_receiver(msg), "pictures/senrankagura/hanzouacademy/yagyuu.jpg", ok_cb, false)
|
||||
end
|
||||
|
||||
if string.starts(msg.text, '/haruka') or string.starts(msg.text, "/Haruka") then
|
||||
send_photo(get_receiver(msg), "pictures/senrankagura/hebijoacademy/haruka.jpg", ok_cb, false)
|
||||
end
|
||||
@ -43,8 +39,8 @@ end
|
||||
|
||||
return {
|
||||
description = "Sendet euch ein Senran Kagura Charakter",
|
||||
usage = {"/asuka","/Asuka","/hibari","/Hibari","/ikaruga","/Ikaruga","/katsuragi","/Katsuragi","/yagyuu","/Yagyuu","/haruka","/Haruka","/hikage","/Hikage","/homura","/Homura","/mirai","/Mirai","/yomi","/Yomi"},
|
||||
patterns = {"^/asuka","^/Asuka","^/hibari","^/Hibari","^/ikaruga","^/Ikaruga","^/katsuragi","^/Katsuragi","^/yagyuu","^/Yagyuu","^/haruka","^/Haruka","^/hikage","^/Hikage","^/homura","^/Homura","^/mirai","^/Mirai","^/yomi","^/Yomi"},
|
||||
usage = {"/asuka","/Asuka","/hibari","/Hibari","/ikaruga","/Ikaruga","/katsuragi","/Katsuragi","/haruka","/Haruka","/hikage","/Hikage","/homura","/Homura","/mirai","/Mirai","/yomi","/Yomi"},
|
||||
patterns = {"^/asuka","^/Asuka","^/hibari","^/Hibari","^/ikaruga","^/Ikaruga","^/katsuragi","^/Katsuragi","^/haruka","^/Haruka","^/hikage","^/Hikage","^/homura","^/Homura","^/mirai","^/Mirai","^/yomi","^/Yomi"},
|
||||
run = run
|
||||
}
|
||||
--by Akamaru [https://ponywave.de]
|
25
plugins/yagyuu.lua
Normal file
25
plugins/yagyuu.lua
Normal file
@ -0,0 +1,25 @@
|
||||
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",
|
||||
usage = "/yagyuu",
|
||||
patterns = {"^/[Y|y]agyuu$"},
|
||||
run = run
|
||||
}
|
||||
-- Created by github.com/Brawl345
|
||||
end
|
Reference in New Issue
Block a user