Skip to content

Commit 7687cf6

Browse files
committed
docs: Update $(customapi) and $(ffzemotes) documentation
1 parent bf7ce2d commit 7687cf6

2 files changed

Lines changed: 85 additions & 15 deletions

File tree

docs/chatbot/variables/customapi.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
---
22
id: customapi
33
sidebar_label: "$(customapi)"
4-
description: "Learn how to use the $(customapi) variable in StreamElements Chatbot to make API requests and display responses in chat."
4+
description: "Learn how to use $(customapi) in StreamElements Chatbot to make API requests and display responses in chat messages."
5+
tags:
6+
- variables
7+
- api
8+
- integrations
59
keywords:
610
- StreamElements
711
- chatbot
812
- customapi
913
- API request
1014
- variable
15+
- urlfetch
1116
---
1217

13-
# $(customapi)
18+
# $(customapi) Variable
1419

1520
## Overview
1621

17-
The `$(customapi)` variable allows you to make a request to a specified URL and return the response directly in chat. This powerful feature enables you to integrate external data sources into your stream's chat messages.
22+
The `$(customapi)` variable enables you to make HTTP requests to external APIs and display the responses directly in your stream's chat. This powerful feature allows you to integrate real-time data from various sources into your chat messages and commands.
1823

1924
## Usage
2025

@@ -24,11 +29,11 @@ To use the `$(customapi)` variable, include it in your chat message or command r
2429
$(customapi URL)
2530
```
2631

27-
Replace `URL` with the actual API endpoint you want to call.
32+
Replace *URL* with the actual API endpoint you want to call.
2833

2934
## Examples
3035

31-
### Example 1: Fetching the latest YouTube video
36+
### Fetching the latest YouTube video
3237

3338
```
3439
$(customapi https://decapi.me/youtube/latest_video?id=UCjerlCIbLPQwSnYlClkjDXg)
@@ -39,7 +44,7 @@ Output:
3944
STREAMELEMENTS PATCH NOTES - SEPTEMBER 10, 2023 #streamelements #updates #patchnotes - https://youtu.be/-q_q37PoaM8
4045
```
4146

42-
### Example 2: Getting a random joke
47+
### Getting a random joke
4348

4449
```
4550
$(customapi https://official-joke-api.appspot.com/random_joke)
@@ -52,11 +57,22 @@ Output:
5257

5358
## Parameters
5459

55-
The `$(customapi)` variable itself does not take any parameters. However, you can include query parameters in the URL you're requesting if the API requires them.
60+
The `$(customapi)` variable itself doesn't accept parameters. However, you can include query parameters in the URL if the API requires them. For example:
5661

62+
```
63+
$(customapi https://api.example.com/data?param1=value1&param2=value2)
64+
```
5765

5866
## Aliases
5967

6068
- `$(urlfetch)`
6169

70+
## FAQ
71+
72+
**Q: Can I use `$(customapi)` to make POST requests?**
73+
74+
A: No, `$(customapi)` only supports GET requests.
75+
76+
**Q: How can I handle JSON responses?**
6277

78+
A: `$(customapi)` returns the raw response. To parse JSON, you may need to use additional tools or custom integrations.
Lines changed: 62 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,84 @@
11
---
22
id: ffzemotes
3+
sidebar_label: "$(ffzemotes)"
4+
description: "Learn how to use the $(ffzemotes) variable to display active FrankerFaceZ emotes in your Twitch channel."
35
tags:
46
- chatbot
57
- variable
8+
- emotes
69
keywords:
710
- ffz
811
- emotes
912
- frankerfacez
13+
- twitch
14+
- chat
1015
---
1116

12-
# $(ffzemotes)
17+
# $(ffzemotes) Variable
18+
19+
## Overview
20+
21+
The `$(ffzemotes)` variable is used to display a list of active FrankerFaceZ (FFZ) emotes in your Twitch channel. This can be helpful for viewers to see which custom emotes are available for use in the chat.
22+
23+
## Usage
1324

14-
Lists the active FrankerFaceZ emotes in the channel.
25+
To use this variable, simply include `$(ffzemotes)` in your chat message or command response. The chatbot will automatically replace it with a list of active FFZ emotes.
1526

16-
#### Parameters
27+
## Examples
1728

18-
This variable does not take any parameters.
29+
### Example 1: Displaying FFZ Emotes
30+
31+
**Command:**
32+
```
33+
!ffzemotes
34+
```
35+
36+
**Chatbot Response:**
37+
```
38+
The active FFZ emotes in this channel are: $(ffzemotes)
39+
```
40+
41+
**Output:**
42+
```
43+
The active FFZ emotes in this channel are: LULW KEKW 5Head PogU
44+
```
1945

20-
#### Example Input
46+
### Example 2: Creating a Custom Command
2147

48+
**Command:**
2249
```
23-
$(ffzemotes)
50+
!command add !customemotes Our channel's FFZ emotes: $(ffzemotes)
2451
```
2552

26-
#### Example Output
53+
**Usage:**
54+
```
55+
!customemotes
56+
```
2757

58+
**Chatbot Response:**
2859
```
29-
LULW KEKW 5Head PogU
60+
Our channel's FFZ emotes: LULW KEKW 5Head PogU
3061
```
62+
63+
## Parameters
64+
65+
This variable does not accept any parameters.
66+
67+
## Related Variables
68+
69+
- [$(bttvemotes)](bttvemotes): Lists active BetterTTV emotes in the channel
70+
- [$(7tvemotes)](7tvemotes): Lists active 7TV emotes in the channel
71+
72+
## FAQ
73+
74+
**Q: How often is the FFZ emote list updated?**
75+
76+
A: The FFZ emote list is cached for 48 hours. To update the list immediately, you can use the command `!emotes reload`.
77+
78+
**Q: Can I filter or limit the number of emotes displayed?**
79+
80+
A: The `$(ffzemotes)` variable doesn't have built-in filtering or limiting options. To manipulate the output, you'll need to use additional StreamElements variables or custom code.
81+
82+
**Q: What if there are no FFZ emotes in the channel?**
83+
84+
A: If there are no active FFZ emotes, the variable will return an empty string.

0 commit comments

Comments
 (0)