/// <summary> /// Called when the twitch client receives a message /// </summary> private void OnMessageReceived(object sender, OnMessageReceivedArgs e) { var chatMessage = e.ChatMessage; var evnt = new OnMessageArgs(); evnt.Message = chatMessage.Message.Trim(); evnt.ClientId = chatMessage.UserId; OnMessage.Invoke(this, evnt); }
/// <summary> /// Called when the twitch client receives a message /// </summary> private void OnMessageReceived(object sender, OnMessageReceivedArgs e) { var chatMessage = e.ChatMessage; var evnt = new OnMessageArgs(); evnt.Message = chatMessage.Message.Trim(); evnt.ClientId = chatMessage.UserId; evnt.Username = chatMessage.Username.ToLower(); // lower case the username to allow case-insensitive comparisons OnMessage.Invoke(this, evnt); }