Skip to content

Commit

Permalink
Updated documentation (#27)
Browse files Browse the repository at this point in the history
* Update math variable documentation

Added examples on how to use the math.js functions, like `round()`

* Update emotes.md

* Update closestore.md

* Create level.md

* Updated step_2 image

* Update step_3 image

* Update creating.md
  • Loading branch information
c4ldas authored Mar 27, 2024
1 parent 8bff4b6 commit 18011fe
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 14 deletions.
18 changes: 17 additions & 1 deletion docs/chatbot/commands/default/closestore.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,20 @@ tags:

# !closestore

TBD
The `!closestore` command is used to disable all regular items in the loyalty stream store that were previously enabled.

### Arguments

- None

#### Example Input

```
!closestore
```

#### Example Output

```
@Styler, successfully updated 10 items.
```
10 changes: 8 additions & 2 deletions docs/chatbot/commands/default/emotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ tags:
---
# !emotes

The `!emotes` command is used to display the list of available emotes in the chat.
The `!emotes` command is used to display the list of available emotes in the chat as well as reload them to update the list.

### Usage

```
!emotes <platform>
!emotes reload
```

#### Available Platforms
Expand All @@ -25,10 +27,14 @@ The `!emotes` command is used to display the list of available emotes in the cha

```
!emotes 7tv
!emotes reload
```

### Example Output

```
Active 7TV emotes in chat: GIGACHAD JUSSY Joel JoelPride Joeler Joelest OMEGALUL donowall mamamia modCheck peepoLeave
Active 7TV emotes in chat: GIGACHAD JUSSY Joel JoelPride Joeler Joelest OMEGALUL donowall mamamia modCheck peepoLeave
@styler, successfully updated emotes :)
```
64 changes: 64 additions & 0 deletions docs/chatbot/commands/default/level.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
id: setpoints
tags:
- chatbot
- commands
---
# !level

The `!level` command is used to show/set a level of a user.

### Arguments

- `<username>` (required): The username of the person you want to check or set the level.
- `<value>` (optional): The level value.
- `reset` (optional): Reset the level to 100.

### Possible values

- `100` - normal user (default value)
- `250` - subscriber (automatically set for a subscriber)
- `300` - regular
- `400` - VIP (automatically set for a VIP)
- `500` - mod (automatically set for a moderator)
- `1000` - supermod

Note: Although `subscriber`, `VIP` and `mod` are automatically set, you can also manually define the same level to a specific user. Useful if you want to create a command only for subscribers, but also want to permit a specific user to be able to run that command.

### Usage

````
!level <username>
!level <username> <value>
!level <username> reset
````

### Example input

```
!level darkoe
!level darkoe 500
!level darkoe reset
```

### Example output

```
@styler, the level of darkoe is 100
@styler, successfully set darkoe's level to 500, you can reset it with !level darkoe reset
@styler, successfully reset darkoe's level to 100 Kappa
```

### Example error

```
@styler, usage !level USER 500/reset
@styler, valid levels are: 100 (pleb), 250 (sub), 300 (regular), 400 (VIP), 500 (mod), 1000 (supermod)
```
20 changes: 11 additions & 9 deletions docs/chatbot/gettingstarted/customcommands/creating.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ Commands are the main way users will interact with the bot in your chat. They ca
## Step 2 - Basic settings

1. Enter the desired name for your new command. For this example we will name the command "lastseen".
2. Add your desired response. For a list of all available variables, see the [variables documentation](../../variables).

![Step 2](img/step_2.png)

## Step 3 - Advanced settings

1. Optional: In the "Response Type" dropdown, select the method you would like the bot to use to send the response.

2. Optional: In the "Response Type" dropdown, select the method you would like the bot to use to send the response.
- "Say" will send the response as a chat message as it is entered in the basic settings.
- "Mention" will send the response as a chat message, but will prefix the message with [`@$(user),`](../../variables/sender).
- "Reply" will send the response as a native reply to the user who triggered the command.
- NOTE: If the platform does not support native replies, the response will be sent as a "Mention" instead.
- "Whisper" will send the response as a whisper to the user who triggered the command.
2. Optional: Add one or more command aliases to allow users to trigger the same command using alternate names.
3. Click the "Activate Command" button to save your new command.
3. Add your desired response. For a list of all available variables, see the [variables documentation](../../variables).

![Step 2](img/step_2.png)

## Step 3 - Advanced settings


1. Optional: Add one or more command aliases to allow users to trigger the same command using alternate names.
2. Click the "Activate Command" button to save your new command.

![Step 3](img/step_3.png)
Binary file modified docs/chatbot/gettingstarted/customcommands/img/step_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/chatbot/gettingstarted/customcommands/img/step_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions docs/chatbot/variables/math.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@ Outputs the result of a math.js expression.

#### Parameters

This variable takes a math.js expression as a parameter.
This variable takes a math.js expression as a parameter. You can also use math.js functions like `round()`, `floor()`, `log()`, `random()`, etc.

#### Example Input

```
$(math 2 + 2)
${math 2 + 2}
${math round(10/3)}
${math random(1,10)}
```

#### Example Output

```
4
3
7.525986609745358
```

0 comments on commit 18011fe

Please sign in to comment.