This commit is contained in:
Akamaru 2016-12-12 13:31:19 +01:00
parent d86d2ed844
commit 7da3e43181
3 changed files with 9 additions and 3 deletions

View File

@ -38,7 +38,7 @@ function plex:get_plex(query)
}
local ok, response_code, response_headers, response_status_line = http.request(request_constructor)
if not ok then return 'NOTOK' end
local data = json.decode(table.concat(response_body))._children[1]
local data = json.decode(table.concat(response_body)).MediaContainer.Metadata[1]
local title = '<b>'..data.title..'</b>'

View File

@ -117,7 +117,7 @@ function quotes:action(msg, config, matches)
return
elseif matches[1] == "delquote" and not matches[2] then
if not is_sudo(msg, config) then
utilities.send_reply(msg, config.errors.sudo)
utilities.send_reply(msg, config.errors.sudo, true)
return
end
if msg.reply_to_message then

View File

@ -35,7 +35,8 @@ special.triggers = {
"^%(\\$",
"^/[Ss][Cc][Hh][Ee][Ll][Ll][Ee]$",
"^[Pp][Ii][Nn][Gg]$",
"^[Dd][Aa][Ss] [Ii][Ss][Tt]? [Nn][Ii][Cc][Hh][Tt]? [Ll][Uu][Ss][Tt][Ii][Gg]!?$"
"^[Dd][Aa][Ss] [Ii][Ss][Tt]? [Nn][Ii][Cc][Hh][Tt]? [Ll][Uu][Ss][Tt][Ii][Gg]!?$",
"/[Bb][Ll][Uu][Ee][Tt][Ee][Xx][Tt]"
}
@ -133,6 +134,11 @@ function special:action(msg, config, matches)
output = 'Pong'
elseif msg_text:match("^[Dd][Aa][Ss] [Ii][Ss][Tt]? [Nn][Ii][Cc][Hh][Tt]? [Ll][Uu][Ss][Tt][Ii][Gg]!?$") then
output = 'Aber Funny!'
elseif msg_text:match("/[Bb][Ll][Uu][Ee][Tt][Ee][Xx][Tt]") then
output = [[BLUE TEXT
MUST CLICK
I AM A STUPID ANIMAL THAT IS ATTRACTED TO COLORS]]
end
utilities.send_reply(msg, output)