Add User To Group
Add a Twitch user to a group

Add User To Group Dialog
Parameters
User Login
String required
can be a user name or a variable like %userName%
Group Name
String required
can be a specific group name or a variable
Variables
Name | Type | Description |
---|---|---|
Example Value: True/False indicator whether the addition has been successful or not |
C# Usage
Add a user, by username (login name), to a group
0.2.3
public bool AddUserToGroup(string userName, Platform platform, string groupName)
userNamestring required platformPlatform required groupNamestring required
using System;
public class CPHInline
{
public bool Execute()
{
//Define the groupname you want to add the user to
string groupName = "Test Group";
//Get UserName
CPH.TryGetArg("userName",out string userName);
//Get user type and define the Platform Enum
CPH.TryGetArg("userType",out string userType);
Enum.TryParse(userType, out Platform platform);
//Method returns a bool type which you can check if the user was added
bool userGotAdded = CPH.AddUserToGroup(userName, platform, groupName);
return true;
}
}