Skip to content

Commit

Permalink
misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Whipstickgostop committed Feb 20, 2024
1 parent cf03c6b commit 916a50e
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 61 deletions.
8 changes: 4 additions & 4 deletions streamerbot/1.get-started/4.faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class CPHInline
{
public bool Execute()
{

string userId = args["userId"].ToString();
string groupName = "group1";
bool inGroup = CPH.UserIdInGroup(userId,groupName);
Expand All @@ -75,7 +75,7 @@ public class CPHInline
{
public bool Execute()
{

string user = args["user"].ToString();
string message = "Hello, this is a test whisper message!";
CPH.SendWhisper(user, message, true); //set "true" to "false" if you want to send the whisper with your broadcaster account
Expand Down Expand Up @@ -125,7 +125,7 @@ This can also be done for filters on a scene, but you won’t be able to select
There are two options. The first one would be to trigger whenever you change your category on Twitch. You'd use the [Stream Update](<https://docs.streamer.bot/api/triggers/twitch/general/stream-update>) trigger and create an if/else-subaction (`Core -> Logic -> If/Else`) to check for:
`if gameName equals GameX do ActionY`, where ActionY would contain all subactions to enable/disable whatever you want.

The second option is to check for when the game process starts on your PC. You'd use the [Process Started](<https://docs.streamer.bot/api/triggers/core/processes/process-started>) trigger (`Core -> Processes -> Process Started`) for that. You can then specify the name within the trigger, it usually is just the name that pops up in your [task manager](<https://i.imgur.com/KM6XS0b.png>). If there are multiple process names available, try them out one by one and see which one triggers the action.
The second option is to check for when the game process starts on your PC. You'd use the [Process Started](<https://docs.streamer.bot/api/triggers/core/processes/process-started>) trigger (`Core -> Processes -> Process Started`) for that. You can then specify the name within the trigger, it usually is just the name that pops up in your [task manager](<https://i.imgur.com/KM6XS0b.png>). If there are multiple process names available, try them out one by one and see which one triggers the action.

**Note**: Some games with anticheat will prevent you from using the process as a trigger.

Expand Down Expand Up @@ -174,5 +174,5 @@ In this example, if `%user%` doesn't exist, it will have the value `null` and th


### 21. Can I use math in a subaction?
Yes, for most cases you will need a *Set Argument* subaction (`Core -> Arguments -> Set Argument`). In there you can use [inline functions](<https://wiki.streamer.bot/en/Inline-Functions>). Choose any variable name and then do the math in the *Value* field. If you wanted to convert seconds to milliseconds to then use it in a delay subaction, you can do it like this: `$math(%secondsVariable% * 1000)$`. Simply use the newly named variable in a *Delay* subaction afterwards. (Example: [see here](<https://i.imgur.com/8RoLBgN.png>))
Yes, for most cases you will need a *Set Argument* subaction (`Core -> Arguments -> Set Argument`). In there you can use [inline functions](/guide/variables#inline-functions). Choose any variable name and then do the math in the *Value* field. If you wanted to convert seconds to milliseconds to then use it in a delay subaction, you can do it like this: `$math(%secondsVariable% * 1000)$`. Simply use the newly named variable in a *Delay* subaction afterwards. (Example: [see here](<https://i.imgur.com/8RoLBgN.png>))

4 changes: 2 additions & 2 deletions streamerbot/2.guide/2.triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Range configuration is used for filtering incoming numeric triggers based on min

![Range Trigger Configuration](./assets/range-trigger.png)

For example, the [Twitch Cheer Trigger](/api/triggers/twitch/bits/cheer) allows you to filter incoming trigger events for a specified bit range.
For example, the [Twitch Cheer Trigger](/api/triggers/twitch/chat/cheer) allows you to filter incoming trigger events for a specified bit range.

::callout{icon=i-mdi-lightbulb color=amber}
`Min` and `Max` values are **inclusive**
Expand Down Expand Up @@ -129,7 +129,7 @@ Always execute this trigger, even if another matching trigger has been configure
This is a special option that only applies to [range triggers](#range)
::

For example, if you have a [Twitch Cheer Trigger](/api/triggers/twitch/bits/cheer) setup to execute on **any** value, and another setup to execute on **exactly 100 Bits**:
For example, if you have a [Twitch Cheer Trigger](/api/triggers/twitch/chat/cheer) setup to execute on **any** value, and another setup to execute on **exactly 100 Bits**:

- Enabling `Always Run` will allow both triggers to execute
- Disabling `Always Run` will **only** execute the `Any` trigger if the bit value does not equal 100 Bits
Expand Down
2 changes: 1 addition & 1 deletion streamerbot/2.guide/20.platforms/0.twitch.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ To create a new Channel Point Reward, :shortcut{value="Right-Click"} anywhere in
Your configured channel point rewards will be available as [triggers](/guide/triggers) to execute your actions in Streamer.bot

::callout{icon=i-mdi-bookmark color=green to=/api/triggers/twitch/channel-reward/reward-redemption}
Explore the [Reward Redemption](#) trigger API Reference
Explore the [Reward Redemption](/api/triggers/twitch/channel-reward/reward-redemption) trigger API Reference
::

## Polls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Enter the name of the variable in which to store your argument.
Enter the value to store in your argument / variable.

::list
- You can use other [Variables](/guide/variables) or [Inline Functions](/guide/variables/functions) to manipulate existing arguments
- You can use other [Variables](/guide/variables) or [Inline Functions](/guide/variables#inline-functions) to manipulate existing arguments
::

### `Auto Type`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,53 +1,72 @@
# Get User Info for Target
Get various data from a Twitch user and populate a set of variables.
---
title: Get User Info for Target
description: Fetch Twitch user data and populate a set of variables
commonVariables:
- TwitchUser
variables:
- name: targetUser
description: Display name of the target user
- name: targetUserName
description: User name of the target user
- name: targetUserId
description: User Id of the target user
- name: targetDescription
description: The user's channel description
- name: targetDescriptionEscaped
description: The user's channel description but URL encoded
- name: targetUserProfileImageUrl
description: link to the 300x300px PNG version of a user's twitch profile image
- name: targetUserProfileImageUrlEscaped
description: The url to the user's profile image URL encoded
- name: targetUserType
description: The type of user, `affiliate`, `partner` or empty for regular user
- name: targetIsAffiliate
description: A boolean value indicating if the user is an affiliate
- name: targetIsPartner
description: A boolean value indicating if the user is a partner
- name: targetLastActive
description: When the user was last active
- name: targetPreviousActive
description: When the user was previously active
- name: targetIsSubscribed
description: A boolean value indicating if the user is currently subscribed
- name: targetSubscriptionTier
description: '`1000`, `2000`, `3000` - Numeric value indicating tier'
- name: targetIsModerator
description: A boolean value indicating if the user is a moderator
- name: targetIsVip
description: A boolean value indicating if the user is a VIP
- name: targetChannelTitle
description: The stream title of the user
- name: game
description: The user's current game category
- name: gameId
description: The numeric id of the game category
- name: createdAt
description: Datetime of when the account was created
- name: accountAge
description: Age of the account in seconds
- name: tagCount
description: A count of the tags that channel set most recently
- name: tag#
description: Consecutive arguments populated with one tag value each
- name: tags
description: All tags in a `list` format
- name: tagsDelimited
description: A comma separated list of all tags
---

:image-preview

## Parameters
## Configuration
### `Source Type`
Name | Description
----:|:------------
`Broadcaster` | The currently logged in broadcaster account
`User` | User that invoked the action e.g. a raid leader, subscriber, point redeemer etc.
`From Input` | This will take the next word proceeding the trigger as the username to lookup. This user does not have to be present in the channel
`Variable` | Use the content of an existing variable as the target

### `Variable`
If you selected `Variable` as your `Source Type`, enter the name of the variable you would like to read in.

## Variables
:variables-description{empty}

Name | Description
----:|:------------
`targetUser` | Display name of the target user
`targetUserName` | User name of the target user
`targetUserId` | User Id of the target user
`targetDescription` | The user's channel description
`targetDescriptionEscaped` | The user's channel description but URL encoded
`targetUserProfileImageUrl` | link to the 300x300 px PNG version of a user's twitch profile image
`targetUserProfileImageUrlEscaped` | The url to the user's profile image URL encoded
`targetUserType` | The type of user, `affiliate`, `partner` or empty for regular user
`targetIsAffiliate` | A boolean value indicating if the user is an affiliate
`targetIsPartner` | A boolean value indicating if the user is a partner
`targetLastActive` | When the user was last active
`targetPreviousActive` | When the user was previously active
`targetIsSubscribed` | A boolean value indicating if the user is currently subscribed
`targetSubscriptionTier` | `1000`, `2000`, `3000` - Numeric value indicating tier
`targetIsModerator` | A boolean value indicating if the user is a moderator
`targetIsVip` | A boolean value indicating if the user is a VIP
`targetChannelTitle` | The stream title of the user
`game` | The user's current game category
`gameId` | The numeric id of the game category
`createdAt` | Datetime of when the account was created
`accountAge` | Age of the account in seconds
`tagCount` | A count of the tags that channel set most recently
`tag#` | Consecutive arguments populated with one tag value each
`tags` | All tags in a `list` format
`tagsDelimited` | A comma separated list of all tags

:variables{name=TwitchUser disclosure}

## C# Usage
:csharp-method
::field-group
::field{name="Source Type" type=Select}
- `Broadcaster` - The currently logged in broadcaster account
- `User` - User that invoked the action e.g. a raid leader, subscriber, point redeemer etc.
- `From Input` - This will take the next word proceeding the trigger as the username to lookup. This user does not have to be present in the channel
- `Variable` - Use the current value of an existing variable as the target
::
::field{name="Variable" type=Text}
If you selected `Variable` as your `Source Type`, enter the name of the variable you would like to read in
::
::
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ commonVariables:
---

::callout{icon=i-mdi-bookmark to=/guide/commands}
Check out the [Commands Guide](#) for details on configuring your Commands
Check out the [Commands Guide](/guide/commands) for details on configuring your Commands
::

:image-preview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ commonVariables:
---

::callout{icon=i-mdi-bookmark to=/guide/commands}
Check out the [Commands Guide](#) for details on configuring your Commands
Check out the [Commands Guide](/guide/commands) for details on configuring your Commands
::

:image-preview
Expand Down
2 changes: 1 addition & 1 deletion streamerbot/3.api/2.triggers/core/midi/message.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ variables:
---

::callout{icon=i-mdi-bookmark to=/guide/midi}
Check out the [MIDI Configuration Guide](#) for details on configuring your MIDI devices
Check out the [MIDI Configuration Guide](/guide/midi) for details on configuring your MIDI devices
::

:image-preview
Expand Down
2 changes: 1 addition & 1 deletion streamerbot/4.changelogs/v0.1.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ releaseDate: 2023-05-31
* Add support for [Twitch Guest Star](#twitch-guest-star) events
* Add new sub-actions for [Twitch Guest Star](#twitch-guest-star) API calls
* Add new [C# Methods](#new-c-methods) for Stream Deck
* Add new [Labs](@labs) settings page
* Add new [Labs](#labs) settings page
* Add new Action Queue type, see [Labs](#labs)
* Add a new Twitch Add Present User sub-action
::
Expand Down

0 comments on commit 916a50e

Please sign in to comment.