/help for user convenience
This commit is contained in:
parent
259aac58b1
commit
7dd198421a
@ -38,14 +38,14 @@ function PLUGIN.action(msg)
|
|||||||
local jstr, res = HTTP.request(url)
|
local jstr, res = HTTP.request(url)
|
||||||
|
|
||||||
if res ~= 200 then
|
if res ~= 200 then
|
||||||
send_msg(target, 'Connection error.', ok_cb, false)
|
send_msg(msg, 'Connection error.')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local jdat = JSON.decode(jstr)
|
local jdat = JSON.decode(jstr)
|
||||||
|
|
||||||
if #jdat.responseData.results < 1 then
|
if #jdat.responseData.results < 1 then
|
||||||
send_msg(target, 'No results found.', ok_cb, false)
|
send_msg(msg, 'No results found.')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@ PLUGIN.doc = [[
|
|||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!help',
|
'^!help',
|
||||||
'^!h$'
|
'^!h$',
|
||||||
|
'^/help'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
Reference in New Issue
Block a user