|
1 | 1 | --- |
2 | 2 | id: channel |
3 | | -description: Learn how to use channel-specific variables in your Twitch chatbot to display channel name, viewers, followers, subscribers, and more. |
| 3 | +sidebar_label: "$(channel)" |
| 4 | +description: "Learn how to use channel-specific variables in your StreamElements chatbot to display channel information on Twitch streams." |
4 | 5 | tags: |
5 | | - - chatbot |
6 | | - - variable |
7 | | - - twitch |
8 | | - - twitch subscriber count |
| 6 | +- chatbot |
| 7 | +- variable |
| 8 | +- twitch |
| 9 | +- channel information |
| 10 | +keywords: |
| 11 | +- StreamElements chatbot |
| 12 | +- Twitch channel variables |
| 13 | +- stream viewer count |
| 14 | +- follower count |
| 15 | +- subscriber count |
9 | 16 | --- |
10 | 17 |
|
11 | | -# $(channel) |
| 18 | +# Channel Variables |
12 | 19 |
|
13 | | -Displays the name of the channel |
| 20 | +## Overview |
14 | 21 |
|
15 | | -#### Parameters |
| 22 | +Channel variables allow you to display dynamic information about your Twitch channel in chat messages or overlays. These variables provide real-time data such as channel name, viewer count, follower count, and subscriber information. |
16 | 23 |
|
17 | | -This variable does not take any parameters. |
| 24 | +## Usage |
18 | 25 |
|
19 | | -#### Example Output |
| 26 | +To use a channel variable, simply include it in your chatbot command. The variable will be replaced with the corresponding value when the message is sent. |
| 27 | + |
| 28 | +## Examples |
| 29 | + |
| 30 | +Here are some examples of how to use channel variables: |
20 | 31 |
|
21 | 32 | ``` |
22 | | -styler |
| 33 | +Welcome to $(channel)! We currently have $(channel.viewers) viewers. |
23 | 34 | ``` |
24 | 35 |
|
25 | | -## $(channel.viewers) |
26 | | - |
27 | | -Displays the channel’s current viewer count |
| 36 | +``` |
| 37 | +Thanks for watching! $(channel.display_name) has $(channel.followers) followers and $(channel.subs) subscribers. |
| 38 | +``` |
28 | 39 |
|
29 | | -#### Parameters |
| 40 | +## Available Variables |
30 | 41 |
|
31 | | -This variable does not take any parameters. |
| 42 | +### $(channel) |
32 | 43 |
|
33 | | -#### Example Input |
| 44 | +Displays the name of the channel. |
34 | 45 |
|
| 46 | +**Example:** |
35 | 47 | ``` |
36 | | -$(channel) has $(channel.viewers) viewers |
| 48 | +Welcome to $(channel)! |
37 | 49 | ``` |
38 | | - |
39 | | -#### Example Output |
40 | | - |
| 50 | +**Output:** |
41 | 51 | ``` |
42 | | -onslaught has 100 viewers |
| 52 | +Welcome to styler! |
43 | 53 | ``` |
44 | 54 |
|
45 | | -## $(channel.followers) |
46 | | - |
47 | | -Displays the channel’s total follower count |
| 55 | +### $(channel.viewers) |
48 | 56 |
|
49 | | -#### Parameters |
50 | | - |
51 | | -This variable does not take any parameters. |
52 | | - |
53 | | -#### Example Input |
| 57 | +Displays the channel's current viewer count. |
54 | 58 |
|
| 59 | +**Example:** |
55 | 60 | ``` |
56 | | -$(channel) has $(channel.followers) followers |
| 61 | +We have $(channel.viewers) viewers right now! |
57 | 62 | ``` |
58 | | - |
59 | | -#### Example Output |
60 | | - |
| 63 | +**Output:** |
61 | 64 | ``` |
62 | | -onslaught has 100 followers |
| 65 | +We have 100 viewers right now! |
63 | 66 | ``` |
64 | 67 |
|
65 | | -## $(channel.subs) |
| 68 | +### $(channel.followers) |
66 | 69 |
|
67 | | -Displays the channel’s total subscriber count |
| 70 | +Displays the channel's total follower count. |
68 | 71 |
|
69 | | -#### Parameters |
| 72 | +**Example:** |
| 73 | +``` |
| 74 | +Thanks to our $(channel.followers) followers! |
| 75 | +``` |
| 76 | +**Output:** |
| 77 | +``` |
| 78 | +Thanks to our 5000 followers! |
| 79 | +``` |
70 | 80 |
|
71 | | -This variable does not take any parameters. |
| 81 | +### $(channel.subs) |
72 | 82 |
|
73 | | -#### Example Input |
| 83 | +Displays the channel's total subscriber count. |
74 | 84 |
|
| 85 | +**Example:** |
75 | 86 | ``` |
76 | | -$(channel) has $(channel.subs) subscribers |
| 87 | +We've reached $(channel.subs) subscribers! |
77 | 88 | ``` |
78 | | - |
79 | | -#### Example Output |
80 | | - |
| 89 | +**Output:** |
81 | 90 | ``` |
82 | | -onslaught has 100 subscribers |
| 91 | +We've reached 500 subscribers! |
83 | 92 | ``` |
84 | 93 |
|
85 | | -## $(channel.subpoints) |
| 94 | +### $(channel.subpoints) |
86 | 95 |
|
87 | | -Displays the channel’s total subscriber points |
| 96 | +Displays the channel's total subscriber points. |
88 | 97 |
|
89 | | -#### Parameters |
| 98 | +**Example:** |
| 99 | +``` |
| 100 | +Current sub points: $(channel.subpoints) |
| 101 | +``` |
| 102 | +**Output:** |
| 103 | +``` |
| 104 | +Current sub points: 750 |
| 105 | +``` |
90 | 106 |
|
91 | | -This variable does not take any parameters. |
| 107 | +### $(channel.display_name) |
92 | 108 |
|
93 | | -#### Example Input |
| 109 | +Displays the display name of the channel, which may differ from the channel name in capitalization. |
94 | 110 |
|
| 111 | +**Example:** |
95 | 112 | ``` |
96 | | -$(channel) has $(channel.subpoints) subscriber points |
| 113 | +Welcome to $(channel.display_name)'s stream! |
97 | 114 | ``` |
98 | | - |
99 | | -#### Example Output |
100 | | - |
| 115 | +**Output:** |
101 | 116 | ``` |
102 | | -onslaught has 100 subscriber points |
| 117 | +Welcome to OnSlAuGhT's stream! |
103 | 118 | ``` |
104 | 119 |
|
105 | | -## $(channel.display_name) |
106 | | - |
107 | | -Displays the display name of the channel |
| 120 | +## Related Variables |
108 | 121 |
|
109 | | -#### Parameters |
| 122 | +- [$(user)](user): Displays information about the user who triggered the command |
| 123 | +- [$(touser)](touser): Refers to the target user in commands that mention other users |
110 | 124 |
|
111 | | -This variable does not take any parameters. |
| 125 | +## FAQ |
112 | 126 |
|
113 | | -#### Example Input |
| 127 | +**Q: How often are these variables updated?** |
114 | 128 |
|
115 | | -``` |
116 | | -$(channel) $(channel.display_name) |
117 | | -``` |
| 129 | +A: Channel variables are updated in real-time, reflecting the most current information available from Twitch. |
118 | 130 |
|
119 | | -#### Example Output |
120 | | - |
121 | | -``` |
122 | | -onslaught OnSlAuGhT |
123 | | -``` |
|
0 commit comments