Updated documentation; removed some aliases
This commit is contained in:
parent
eaf147b417
commit
6860bf98de
3 changed files with 24 additions and 18 deletions
|
@ -55,11 +55,7 @@ namespace Noikoio.RegexBot.Module.ModCommands.Commands
|
||||||
{ "say", typeof(Say) },
|
{ "say", typeof(Say) },
|
||||||
{ "unban", typeof(Unban) },
|
{ "unban", typeof(Unban) },
|
||||||
{ "addrole", typeof(RoleAdd) },
|
{ "addrole", typeof(RoleAdd) },
|
||||||
{ "roleadd", typeof(RoleAdd) },
|
{ "delrole", typeof(RoleDel) }
|
||||||
{ "grantrole", typeof(RoleAdd) },
|
|
||||||
{ "delrole", typeof(RoleDel) },
|
|
||||||
{ "roledel", typeof(RoleDel) },
|
|
||||||
{ "revokerole", typeof(RoleDel) }
|
|
||||||
});
|
});
|
||||||
|
|
||||||
public static Command CreateInstance(CommandListener root, JProperty def)
|
public static Command CreateInstance(CommandListener root, JProperty def)
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
## ModTools
|
## ModCommands
|
||||||
|
|
||||||
ModTools is the current name for the component that provides commands for use by moderators. Commands are defined based on a number of available template-like *type*s, which can then be customized with further configuration.
|
ModCommands is the name of the component that provides the ability for one to create useful commands for moderation. These commands are defined based on a number of available template-like *type*s, which can then be customized with further configuration.
|
||||||
|
|
||||||
Sample within a [server definition](serverdef.html):
|
Sample within a [server definition](serverdef.html):
|
||||||
```
|
```
|
||||||
"ModTools": {
|
"ModCommands": {
|
||||||
"Commands": {
|
"Commands": {
|
||||||
"Kick": { // a plain and simple kick command
|
"Kick": { // a plain and simple kick command
|
||||||
"type": "kick",
|
"type": "kick",
|
||||||
|
@ -20,14 +20,14 @@ Sample within a [server definition](serverdef.html):
|
||||||
```
|
```
|
||||||
|
|
||||||
### Definition structure
|
### Definition structure
|
||||||
Commands are defined within a JSON object named `Commands` within another object named `ModTools`. They are defined by means of name/value pairs, with the name serving as its label.
|
Commands are defined within a JSON object named `Commands` within another object named `ModCommands`. They are defined by means of name/value pairs, with the name serving as its label.
|
||||||
|
|
||||||
The following values are **required** in a definition:
|
The following values are **required** in a definition:
|
||||||
* type (*string*) - Specifies the behavior that the command should take.
|
* type (*string*) - Specifies the type of behavior that the command should take.
|
||||||
* command (*string*) - The text trigger for the command being defined. Must not contain spaces, and it is recommended to start it with an uncommon symbol, such as `!`.
|
* command (*string*) - The text trigger for the command being defined. Must not contain spaces, and it is recommended to start it with an uncommon symbol, such as `!`.
|
||||||
|
|
||||||
### Command types
|
### Command types
|
||||||
Each command type specifies the action taken by the bot when the command is invoked. Certain types offer additional configuration options as well.
|
Each command type specifies the action taken by the bot when the command is invoked. Certain types offer additional configuration options.
|
||||||
|
|
||||||
#### Ban
|
#### Ban
|
||||||
* `"type": "ban"`
|
* `"type": "ban"`
|
||||||
|
@ -44,6 +44,11 @@ Additional behavior can be specified in its configuration:
|
||||||
* Uses a default message if this configuration value is not specified.
|
* Uses a default message if this configuration value is not specified.
|
||||||
* To disable, specify a blank value.
|
* To disable, specify a blank value.
|
||||||
|
|
||||||
|
#### Configuration Reload
|
||||||
|
* `"type": "confreload"`
|
||||||
|
* Usage: (*command*)
|
||||||
|
Reloads server configuration. The bot will reply indicating if the reload was successful.
|
||||||
|
|
||||||
#### Kick
|
#### Kick
|
||||||
* `"type": "kick"`
|
* `"type": "kick"`
|
||||||
* Usage: (*command*) (*user name or ID*) [*reason*]
|
* Usage: (*command*) (*user name or ID*) [*reason*]
|
||||||
|
@ -58,12 +63,17 @@ Additional behavior can be specified in its configuration:
|
||||||
* Uses a default message if this configuration value is not specified.
|
* Uses a default message if this configuration value is not specified.
|
||||||
* To disable, specify a blank value.
|
* To disable, specify a blank value.
|
||||||
|
|
||||||
|
#### Role manipulation
|
||||||
|
* `"type": "addrole"` or `"type": "delrole"
|
||||||
|
* Usage: (*command*) (*user name or ID*)
|
||||||
|
Sets or unsets a predefined role upon the given user.
|
||||||
|
|
||||||
|
Additional configuration:
|
||||||
|
* role (*string*) - The role that applies to this command. May be defined in the same type of format accepted within [entity lists](entitylist.html).
|
||||||
|
* successmsg (*string*) - Custom message to display on success. If not specified, a default message is used.
|
||||||
|
* The string *$target* can be used in the value to represent the command target.
|
||||||
|
|
||||||
#### Say
|
#### Say
|
||||||
* `"type": "say"`
|
* `"type": "say"`
|
||||||
* Usage: (*command*) (*channel name or ID*) (*message*)
|
* Usage: (*command*) (*channel name or ID*) (*message*)
|
||||||
Causes the bot to send the given message exactly as specified to the given channel.
|
Causes the bot to send the given message exactly as specified to the given channel.
|
||||||
|
|
||||||
#### Configuration Reload
|
|
||||||
* `"type": "confreload"`
|
|
||||||
* Usage: (*command*)
|
|
||||||
Reloads server configuration. The bot will reply indicating if the reload was successful.
|
|
|
@ -28,4 +28,4 @@ The following is a list of accepted members within a server definition.
|
||||||
* moderators (*[entity list](entitylist.html)*) - A list of entities to consider as moderators. Actions done by members of this list are able to execute *ModTools* commands and are exempt from certain *AutoMod* rules. See their respective pages for more details.
|
* moderators (*[entity list](entitylist.html)*) - A list of entities to consider as moderators. Actions done by members of this list are able to execute *ModTools* commands and are exempt from certain *AutoMod* rules. See their respective pages for more details.
|
||||||
* [automod](automod.html) (*name/value pairs*) - See respective page.
|
* [automod](automod.html) (*name/value pairs*) - See respective page.
|
||||||
* [autoresponses](autorespond.html) (*name/value pairs*) - See respective page.
|
* [autoresponses](autorespond.html) (*name/value pairs*) - See respective page.
|
||||||
* [ModTools](modtools.html) (*name/value pairs*) - See respective page.
|
* [ModCommands](modcommands.html) (*name/value pairs*) - See respective page.
|
Loading…
Reference in a new issue