AddUserIdToGroup
Add a user, by ID, to a group
Signature
public bool AddUserIdToGroup(string userId, Platform platform, string groupName)
Parameters
userId
string required
The unique ID for this user
platform
Streamer.bot.Plugin.Interface.Enums.Platform required
The platform this user belongs to
Possible values:
Platform.TwitchPlatform.YouTubePlatform.TrovoPlatform.Kick
groupName
string required
The name of the group
Return Type
bool
Example
using System;
public class CPHInline
{
public bool Execute()
{
//Define the groupname you want to add the user to
string groupName = "Test Group";
//Get UserId
CPH.TryGetArg("userId",out string userId);
//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.AddUserIdToGroup(userId, platform, groupName); return true;
}
}