Some code clean up
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
function run(msg, matches)
|
||||
local ret = ""
|
||||
for k, dict in pairs(plugins) do
|
||||
ret = ret .. dict.usage .. " -> " .. dict.description .. "\n"
|
||||
if dict.usage ~= "" then
|
||||
ret = ret .. dict.usage .. " -> " .. dict.description .. "\n"
|
||||
end
|
||||
end
|
||||
return ret
|
||||
end
|
||||
@@ -12,5 +14,4 @@ return {
|
||||
usage = "!help",
|
||||
patterns = {"^!help$"},
|
||||
run = run
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,7 @@ function run(msg, matches)
|
||||
end
|
||||
|
||||
return {
|
||||
description = "from image URL downloads it and sends to origin",
|
||||
description = "When user sends image URL (ends with png, jpg, jpeg) download and send it to origin.",
|
||||
usage = "",
|
||||
patterns = {
|
||||
"(https?://[%w-_%.%?%.:/%+=&]+.png)$",
|
||||
|
||||
@@ -5,7 +5,7 @@ function run(msg, matches)
|
||||
end
|
||||
|
||||
return {
|
||||
description = "from media URL downloads it and sends to origin",
|
||||
description = "When user sends media URL (ends with gif, mp4, pdf, etc.) download and send it to origin.",
|
||||
usage = "",
|
||||
patterns = {
|
||||
"(https?://[%w-_%.%?%.:/%+=&]+.gif)$",
|
||||
|
||||
@@ -61,7 +61,7 @@ function run(msg, matches)
|
||||
end
|
||||
|
||||
return {
|
||||
description = "Shows a tweet",
|
||||
description = "When user sends twitter URL, send text and images to origin. Requieres OAuth Key.",
|
||||
usage = "",
|
||||
patterns = {"https://twitter.com/[^/]+/status/([0-9]+)"},
|
||||
run = run
|
||||
|
||||
@@ -8,7 +8,7 @@ function run(msg, matches)
|
||||
end
|
||||
|
||||
return {
|
||||
description = "Shows the bot version",
|
||||
description = "Shows bot version",
|
||||
usage = "!version",
|
||||
patterns = {"^!version$"},
|
||||
run = run
|
||||
|
||||
Reference in New Issue
Block a user