mirror of
https://github.com/Hilbis/Hilbish
synced 2025-07-05 02:32:01 +00:00
Created Commander (markdown)
parent
cd87e70a15
commit
84e0bdb950
16
Commander.md
Normal file
16
Commander.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Commander is Hilbish's custom command library, a way to write commands with the shell in Lua.
|
||||||
|
To require:
|
||||||
|
```lua
|
||||||
|
local commander = require 'commander'
|
||||||
|
```
|
||||||
|
|
||||||
|
# Functions
|
||||||
|
### Commander.register(cmdname, cmdfunction)
|
||||||
|
Registers a new command named `cmdname`, which executes `cmdfunction` when ran.
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
```lua
|
||||||
|
commander.register("hello", function ()
|
||||||
|
print(ansikit.text "{blue}Hello world!{reset}")
|
||||||
|
end)
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user