File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Unity-Twitch-Chat/Assets/Package/Runtime Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -296,5 +296,25 @@ public void SendChatMessage(string message)
296296
297297 connection . SendChatMessage ( message ) ;
298298 }
299+
300+ /// <summary>
301+ /// Join a new channel
302+ /// </summary>
303+ /// <param name="channel">The channel to join</param>
304+ public void JoinChannel ( string channel )
305+ {
306+ if ( channel != "" )
307+ connection . SendCommand ( "JOIN #" + channel . ToLower ( ) , true ) ;
308+ }
309+
310+ /// <summary>
311+ /// Leaves a channel
312+ /// </summary>
313+ /// <param name="channel">The channel to leave</param>
314+ public void LeaveChannel ( string channel )
315+ {
316+ if ( channel != "" )
317+ connection . SendCommand ( "PART #" + channel . ToLower ( ) , true ) ;
318+ }
299319 }
300320}
You can’t perform that action at this time.
0 commit comments