SendMessage

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

Signature

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

Parameters

message
string required

Enter the message contents

useBot
bool
Default:
True
  • true - Send the message using your Twitch Bot account
  • false - Send the message using your Twitch Broadcaster account
fallback
bool
Default:
True
  • 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).

Return Type

void

Example

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;
    }
}