/// <summary> /// Handles channel user state changes. /// </summary> private async Task UserStateHandler(ulong userId, bool talking) { UserVoiceState state = new UserVoiceState { User = CurrentChannel.GetUser(userId), Talking = talking }; if (UserStateChange != null) { await UserStateChange(this, new UserEventArgs(state)); } await Task.CompletedTask; }
/// <summary> /// Makes a new instance of <see cref="UserEventArgs"/> class. /// </summary> /// <param name="userState">New state.</param> public UserEventArgs(UserVoiceState userState) { UserState = userState; }