-
Notifications
You must be signed in to change notification settings - Fork 0
Development
Custom commands can be created by attaching a [Command(name, ...)]
Attribute to a static method.
Commands can be guarded with a Permission by adding a [Permission(name)]
attribute.
A Parameter can be anything as long as a ICommandParser
class exists to convert a string passed from the commandline into an instance of that object.
You can change the name of a parameter displayed by the Help
command by adding a [Title] attribute.
Types supported by default:
- string and string[]
- int and int[]
- long and long[]
- bool and bool[]
- IClient and IClient[]
- TimeSpan
If you need to have another type as a parameter for a command, you can create your own parser by making a class which implements ICommandParser, this class will be automatically used when calling that command.
You can access information about the calling of the command with the static properties Command.Caller
or Command.Context
.
You can send easily send messages to the callers and recievers of commands with the Logging
helper class.