Add examples for hover/click
This commit is contained in:
1 parent
2b62be8312
commit
892b7723dc
1 file changed
+36
-6
@@ -49,26 +49,56 @@ The below examples assume writing the format in YAML format.
|
||||
#### Simple messages
|
||||
A simple message without any formatting.
|
||||
```yaml
|
||||
info-noPermission: "You do not have permission to use that command!"
|
||||
message: "You do not have permission to use that command!"
|
||||
```
|
||||

|
||||
|
||||
|
||||
A message that is bold and red to make it look more serious.
|
||||
```yaml
|
||||
info-noPermission: "[red][bold]You really do not have permission!"
|
||||
message: "[red][bold]You really do not have permission!"
|
||||
```
|
||||

|
||||
|
||||
|
||||
A message with more color and format changes.
|
||||
```yaml
|
||||
info-noPermission: "[red][bold]You[/bold] really do not have [green][underline]permission[reset]!"
|
||||
message: "[red][bold]You[/bold] really do not have [green][underline]permission[reset]!"
|
||||
```
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
A multi-line message.
|
||||
```yaml
|
||||
message:
|
||||
- "First line"
|
||||
- "[red], still on the first line[break]"
|
||||
- "Second line because of the break above"
|
||||
- ", but no color."
|
||||
```
|
||||

|
||||
|
||||
|
||||
#### Using hover/click parts
|
||||
|
||||
A message with some hover tooltips, each hover will start on a new line.
|
||||
```yaml
|
||||
message:
|
||||
- "Hello there!"
|
||||
- " hover: Have a good day!"
|
||||
- " hover: Second tooltip line :)"
|
||||
```
|
||||

|
||||
|
||||
|
||||
A message with a tooltip and command.
|
||||
```yaml
|
||||
message:
|
||||
- "Hello there!"
|
||||
- " hover: Click me to use /help!"
|
||||
- " command: /help"
|
||||
```
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user