core commands¶
| Plugin | Core |
| Brief | Core commands. |
cat¶
| Aliases | No alias |
| Brief | Read specific data. |
| Usage | cat target |
positional arguments:
target data to read
Examples¶
cat |
list available data |
cat plugins |
display server plugins |
cat commands |
display server commands |
chmod¶
| Aliases | No alias |
| Brief | Manage commands blacklist and server plugins. |
| Usage | chmod [+x PX] [-x NX] |
optional arguments:
+x PX enable TARGET
-x NX disable TARGET
Examples¶
chmod |
List server and channel blacklist. |
chmod +x ~/ |
Enable all disabled commands (channel-wide). |
chmod +x ~/* |
Enable all disabled commands (server-wide). |
chmod +x / |
Enable all disabled plugins (channel-wide). |
chmod +x /* |
Enable all disabled plugins (server-wide). |
chmod +x whois |
Enable ‘whois’ command (channel-wide). |
chmod +x whois -x ah |
Enable ‘whois’ command and disable ‘ah’ command (channel-wide). |
chmod +x whois* |
Enable ‘whois’ command (server-wide). |
chmod +x sysadmin/ |
Enable <sysadmin> plugin (channel-wide). |
chmod +x sysadmin/* |
Enable <sysadmin> plugin (server-wide). |
Details¶
When the parser encounters the suffix string / in TARGET (e.g. nsfw/),
TARGET is interpreted as a plugin name instead of a comand name. The changes
are applied to the current channel by default and are extended to server scope
via the suffix * (e.g. ah* [command] or nsfw/* [plugin]).
The literal string / (resp. /*) describes all commands (resp. plugins)
for the server and can be used as a complete TARGET string. The equivalent
channel scope form is given by ~/ (resp. ~/*).
$ chmod +x ~/ # Enable all the disabled commands on the channel
$ chmod +x ~/* # Enable all the disabled plugins on the channel
$ chmod +x / # Enable all the disabled commands on the server
$ chmod +x /* # Enable all the disabled plugins on the server
$ chmod -x / # Disable all the enabled commands on the server
$ chmod -x /* # Disable all the enabled plugins on the server
Essentials or sysadmin-disabled commands or plugins cannot be changed and the changes are applied only if no error occurs. To disable all commands or plugins on the server, use the shutdown command (to be implemented).
config¶
| Aliases | No alias |
| Brief | Bot server configuration interface. |
| Usage | config [+V | -V] [+at | -at] [--prefix PREFIX] [-v] [-r] [-D] |
optional arguments:
+V set logout voice policy to 'automatic'
-V set logout voice policy to 'manual'
+at set mentions for interaction to 'required'
-at set mentions for interaction to 'optional'
-p, --prefix PREFIX change server command prefix
--verbose, -v change logging policy
--reset, -r reset the server configuration (keep server roles)
--default, -D show the default configuration
Examples¶
config |
Show current server configuration. |
config --prefix ? |
Set command prefix to ‘?’. |
config -v |
Change logging policy to DEFAULT_LOGS. |
config -vv |
Change logging policy to MODS_LOGS. |
config -vvv |
Change logging policy to STATUS_LOGS. |
config -vvvv |
Change logging policy to MANAGE_LOGS. |
Details¶
A prefix has to be a bytes-sequence between <1> and <3> characters with no spaces and distinct from ‘su.’ (reserved).
Logging levels inherit lower levels, i.e. loggers of level L > L' also log
what loggers of level L' may log.
| Level | Description |
|---|---|
DEFAULT_LOGS |
No logs are done. |
MODS_LOGS |
Logs the kick/ban/mute actions |
STATUS_LOGS |
Logs the login/logout and join/leave actions |
MANAGE_LOGS |
Logs the create/delete channel actions |
config-export¶
| Aliases | No alias |
| Brief | Copy and store server configuration for future usage. |
| Usage | config-export [--roles] [--inspect] [--delete] |
optional arguments:
--roles export server custom roles (ShellBot)
--inspect inspect exported configuration
--delete delete exported configuration
Details¶
The ** config-export ** command exports the bot configuration for the server where it is executed. By default, custom roles (in the sense of a role with a GID parent) are not exported. Exported configuration is consumed after approximatively one hour, accordingly to Privacy Terms (see LEGAL terms).
config-import¶
| Aliases | No alias |
| Brief | Import an exported configuration. |
| Usage | config-import [--keep] |
optional arguments:
--keep import server configuration and keep it for further usage
Details¶
The ** config-import ** command allows users to import the ShellBot server configuration from a server A to a server B and must own both servers. Discord server configuration itself is not modified. Importing configuration delete exported configuration. To keep it for further usage (e.g. import to server C), use the ‘–keep’ parameter.
debug¶
| Aliases | gdb |
| Brief | Attempt to debug a locked state. All operations are cancelled and interaction is disabled during the debugging process. |
| Usage | debug |
ignoreme¶
| Aliases | No alias |
| Brief | Add invoker to ShellBot global ignore list. Invoker remove themself from ignore list by sending a private message to the bot. |
| Usage | ignoreme |
log¶
| Aliases | No alias |
| Brief | Manage server logs (ShellBot logs only). |
| Usage | log [--stderr STDERR | -d DATES] [--reset] [--clear] [--today] |
optional arguments:
-s, --stderr STDERR a channel mention for a standard error (stderr) channel
--dates, -d DATES request logs for a given date or period
--reset unset stderr channel
--clear clear all compressed and daily logs
--today inspect current logs
Examples¶
log |
Display current log in stderr channel. |
log -d 12-10-2016 |
Recover logs for the given date. |
log -d 12-10-2016 12-10-2017 |
Recover logs for the given period. |
sleep¶
| Aliases | No alias |
| Brief | Shutdown bot for the server. |
| Usage | sleep [--cancel] [time] [delay] [dt] |
positional arguments:
time time to execute the procedure at
delay shutdown time delay string (syntax +x[d|h|m|s])
dt shutdown time duration string (syntax =x[d|h|m|s])
optional arguments:
-c, --cancel cancel the shutdown procedure
Examples¶
sleep |
Show current shutdown procedure. |
sleep now |
Shutdown for 1 hour. |
sleep 08:00 +d |
Postpone shutdown at ‘08:00’ in 1 day from now. |
sleep 08:00 +2d |
Postpone shutdown at ‘08:00’ in 2 days from now. |
sleep 08:00 +d =30m |
Postpone a shutdown between ‘08:00’ and ‘08:00’ in 1 day from now. |
sleep 08:00 +2d =30m |
Postpone a shutdown between ‘08:00’ and ‘08:30’ in 2 days from now. |
Details¶
<b><u>time</u></b> A time string in the format <b>hh:mm:ss</b> for hour, minutes or seconds specifying the time to execute the shutdown at, and in 24h clock format.
<b><u>delay</u></b> A string starting with <b>+</b> and followed by an integer referring to the delay time value from now and a time format FMT.
<b><u>dt</u></b> A string starting with <b>=</b> and followed by an integer referring to the duration of the shutdown procdure and a time format FMT.