TwitchAnnounce

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

public void TwitchAnnounce(string message, bool bot = false, string color, bool fallback = false)
message
string required

Enter the message contents

bot
bool
color
string

Select the color for the announcement. Valid values are:

  • default – Standard color
  • blue
  • green
  • orange
  • purple
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 an announcement";

        //Send announcement with bot account, or fallback to broadcaster
        CPH.TwitchAnnounce(message, true, color, true); 
        return true;
    }
}