SendMessage

Sends a Twitch chat message using either Twitch Broadcaster or Twitch Bot account

public void SendMessage(string message, bool useBot = true, bool fallback = true)
message
string required

Enter the message contents

useBot
bool
  • true - Send the message using your Twitch Bot account
  • false - Send the message using your Twitch Broadcaster account
fallback
bool
  • true - (If bot bool is set to True), this is the same behaviour as if you had Bot as your preferred account.
  • false - (If bot bool is set to True), it will try to send using only the Bot account, and do nothing if it can't (i.e, not logged in).
void
using System;
public class CPHInline
{
    public bool Execute()
    {
        //Set message for chat
        string message = "This is a test message.";

        //Send message with bot account if bot account disconnect
        //will use broadcaster account
        CPH.SendMessage(message, true, true); 
        return true;
    }
}