Skip to content

Commit

Permalink
Merge pull request #11 from drrnb/main
Browse files Browse the repository at this point in the history
Added SendChatMessage method to IRC instance
  • Loading branch information
lexonegit authored Jan 22, 2023
2 parents 4db9968 + 089d7e2 commit b4b5e54
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Unity-Twitch-Chat/Assets/Package/Runtime/IRC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,5 +276,19 @@ private void BlockingDisconnect()
if (showIRCDebug)
Debug.Log($"{Tags.alert} Disconnected from Twitch IRC");
}

/// <summary>
/// Sends a chat message to the channel
/// </summary>
/// <param name="message">The message to send</param>
public void SendChatMessage(string message)
{
if (useAnonymousLogin)
{
Debug.LogWarning("Chat messages cannot be sent with anonymous login");
return;
}
connection.SendChatMessage(message);
}
}
}

0 comments on commit b4b5e54

Please sign in to comment.