config.yml for settings and commands, messages.yml for text. Run /spyglass reload after editing either one.
Custom Discord Commands
The config key is the command. It doubles as the ID and the signature, so this is the whole setup for a working/ban:
/ban in Discord with a username option. Whatever the user types is substituted wherever {username} appears in the mapped command.
Quoting the key always works, so the examples do it. A bare ban {username}: parses too, because YAML only treats { as special at the start of a value. Quotes become required once a key starts with a brace or contains a colon.
Longer Arguments
Add three dots to the last option when it should swallow a whole sentence, such as a ban reason:suggest-online-players makes Discord autocomplete that option from the live player list.
Per Command Options
Argument types are
string, integer, number, boolean, user, channel, and role. String options can also take a fixed list of choices.
Command Monitor
Mirrors every command run in game into a Discord channel.format. Some alternatives:
Filters
-
ignored-commandsskips commands by name, by full prefix, or with a trailing wildcard such asco*. Login and private message commands are ignored by default so passwords never reach Discord. -
only-commandsflips it around. If that list is not empty, only those commands are relayed and the ignore list is skipped. -
ignored-playershides specific names. -
include-players,include-console,include-discord-commands, andinclude-cancelledtoggle each source.
Batching
Lines are grouped into one Discord message every few seconds, which is what keeps a busy server under Discord’s rate limit. Leave it on unless you need each command to arrive instantly.Message Formatting
Messages inmessages.yml use MiniMessage, so gradients, hover tooltips, and clickable commands are all config rather than code:
&a and &#RRGGBB codes still work. If a line contains one, that whole line is read the old way, so an older messages.yml keeps working after an upgrade.
Placeholder values are always inserted as plain text. A player named “ shows up as those five characters, so nobody can recolour your staff channel or slip a clickable command into a message through a name or a ban reason.
Placeholders
Around 85 placeholders are available. The complete list with descriptions is in the comments at the bottom ofconfig.yml. The common ones:
Anything Spyglass does not recognise is left visible, so a typo shows up in the message instead of quietly turning into an empty string.
