License: GPLv3
Source: Git repo
Wiki: here
Download: LastVersion (v0.2.0)
Changelog: here
Installation with git
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
git clone git@framagit.org:Sobralia/LibChatCommand.git lib_chatcommand
How to use
For more example go to the code sample page of the wiki
To create a foo command and two subcommands (bar and bar2 ie):
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
local foo_cmd = ChatCommand.new("foo",{
params = "", -- if it's a top command, don't fill it
description = "All command for the foo plugin",
func = foo_function,
privs = {foo=true}
})
-- /foo bar
local foo_bar = foo_cmd:register_sub_command("bar",{
params = "<val1> <val2>",
description = "Do a bar with foo",
func = foo_bar_function,
privs = {foo_bar=true}
})
-- /foo bar2
local foo_bar = foo_cmd:register_sub_command("bar2",{
params = "<val1> <val2>",
description = "Do a bar2 with foo",
func = foo_bar2_function,
privs = {foo_bar2=true}
})
Planned features
- Help command (actually does not display help information)
- Named params