Skip to content

Commit

Permalink
add hidden cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Aug 10, 2024
1 parent 84d374a commit 6f1d79a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
4 changes: 3 additions & 1 deletion en/docusaurus-plugin-content-docs/current/Usage/roll.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 2
## Dice Rolling

:::usage
**`/roll (argument)`**
**`/roll (dice) (?hidden)`**
:::

You can also use the "semi-direct" notation by adding a comment: `/roll (dice comments)`.
Expand All @@ -15,6 +15,8 @@ Please note that the "indirect" notation is not available in this mode.

![Roll](/assets/rolls/slash-commands.gif)

The `hidden` option only works if the [hidden rolls](../admin/config/index.md#hidden-dice-hidden_roll) are enabled. If the option is set to true, the result will be sent as an ephemeral message, and use the configured channel (if any) to save the results.

## Creating a New Scene

:::usage
Expand Down
24 changes: 20 additions & 4 deletions en/docusaurus-plugin-content-docs/current/admin/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Unless otherwise specified, all options are disabled by default.
- Auto-complete fields are marked with a `*` : `(*fields)`.
- Fields requiring a statement will be marked with `@` (`@fields`). These fields work with names (role or user, depending on the command) or Discord IDs. If the entry doesn't appear immediately, start typing the beginning of the name for auto-completion.
- Similarly, commands requesting a channel are preceded by `#` like `#fields`.
- Boolean fields are prefixed by `?` (`?fields`).

## Journalization
### Administration: `logs`
Expand Down Expand Up @@ -46,7 +47,7 @@ Sending the command without the "channel" argument will remove the results chann
### Disable auto thread creation: `disable_thread`

:::usage
**`/config disable_threads [true/false]`**
**`/config disable_threads [?toggle]`**
:::

If the option is set to **true**, it disables the default creation of threads for dice rolls. Everything will be sent (without deletion) to the channel where the command was executed.
Expand All @@ -58,14 +59,28 @@ Channels and threads prefixed with `🎲` will no longer receive logs either.

Setting the option to **false** reactivates the bot's normal behavior.

### Hidden dice: `hidden_roll`

:::usage
**`/config hidden_roll [?toggle] (#channel)`**
:::

For `/gm` commands and `/roll` commands, allow to hide the dice roll for the players.

There are two configuration possible:
- If a channel is provided, this channel will be used for the saved dice, replacing `result_channel` when the option `hidden` is used in the roll.
- If no channel is provided, the dice will be hidden in the channel where the command was executed, and no saved dice will be created.

In the two cases, the result will be send as [**ephemeral** message](https://support.discord.com/hc/en-us/articles/1500000580222-Ephemeral-Messages-FAQ), meaning there will be no trace of the dice roll in the channel where the command was executed after some times, and no one else than the roller will see the result.

## Displaying results

Diverses options allows to personalize the display of the dice's results, whether in the save section or in the channel where the throw was made.

### Timestamp: `timestamp`

:::usage
**`/config timestamp [true/false]`**
**`/config timestamp [?toggle]`**
:::

If the option is set to **true**, the timestamp will be displayed in the dice results.
Expand Down Expand Up @@ -95,7 +110,7 @@ This command allow to have both the result log in a dedicated channel (or in thr
### [Save] Link to the dice's context: `context`

:::usage
**`/config context [true/false]`**
**`/config context [?toggle]`**
:::

Adds a link to the context of the die in the die save.
Expand All @@ -111,9 +126,10 @@ If the context message is deleted, the link will no longer work.
### [Dice throw] Link to the saved dice: `save_link`

:::usage
**`/config save_link [true/false]`**
**`/config save_link [?toggle]`**
:::

Adds a link to the die backup in the die result message.

![Link to backup](/assets/rolls/config/backup_link.png)

6 changes: 4 additions & 2 deletions en/docusaurus-plugin-content-docs/current/admin/mj_dice.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ The two following commands allow game masters to roll dice for any registered pl
:::

:::usage
- **`/gm dbroll (@player) [statistic] (*character)`**
- **`/gm dbd (@player) (*dice name) (*character)`**
- **`/gm dbroll (@player) [statistic] (*character) (?hidden)`**
- **`/gm dbd (@player) (*dice name) (*character) (?hidden)`**
:::

Both commands are similar to [dbroll](./model#dbroll-dbroll) and [dbd](./model#dbd-dbd), but additionally require specification of the player for whom the roll is being made. As with the other commands, you can choose a character belonging to this player or leave the default choice.

The hidden option only works if [hidden rolls](../admin/config/index.md#hidden-dice-hidden_roll) are enabled. If the option is set to true, the result will be sent as an ephemeral message, and use the configured channel (if any) to save the results.

0 comments on commit 6f1d79a

Please sign in to comment.