Skip to content

Commit

Permalink
document literals
Browse files Browse the repository at this point in the history
  • Loading branch information
Citymonstret committed Dec 3, 2023
1 parent 411db0a commit fc56983
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,31 @@ if it isn't.

#### Literals

Command literals are fixed strings, and represent what you might think of as a "subcommand."
They may have secondary aliases, depending on the platform you're targeting.

The literals are created by using the various different `Command.Builder.literal` methods, for example:

```java title="Example of literals"
builder
.literal("foo")
.literal(
"bar",
Description.of("A literal with a description and an alias"),
"b"
);
```

Literals are always required.

#### Variable

##### Required

##### Optional

#### Handler

### Customizing the command manager

#### Pre- & Postprocessing
Expand Down

0 comments on commit fc56983

Please sign in to comment.