diff --git a/Unity-Twitch-Chat/Assets/Package/Runtime/IRC.cs b/Unity-Twitch-Chat/Assets/Package/Runtime/IRC.cs
index 8081d0e..06e4ae7 100644
--- a/Unity-Twitch-Chat/Assets/Package/Runtime/IRC.cs
+++ b/Unity-Twitch-Chat/Assets/Package/Runtime/IRC.cs
@@ -279,5 +279,19 @@ private void BlockingDisconnect()
if (showIRCDebug)
Debug.Log($"{Tags.alert} Disconnected from Twitch IRC");
}
+
+ ///
+ /// Sends a chat message to the channel
+ ///
+ /// The message to send
+ public void SendChatMessage(string message)
+ {
+ if (useAnonymousLogin)
+ {
+ Debug.LogWarning("Chat messages cannot be sent with anonymous login");
+ return;
+ }
+ connection.SendChatMessage(message);
+ }
}
}
\ No newline at end of file