private void Client_OnUserJoined(object sender, TwitchLib.Client.Events.OnUserJoinedArgs e) { ConnectedUsers.Add(e.Username, new ConnectedUser(e.Username)); _logger.LogWarning($"New user on channel: {e.Username}"); _logger.LogWarning($"Total user on channel: {ConnectedUsers.Count}"); }
private async void Client_OnUserJoined(object sender, TwitchLib.Client.Events.OnUserJoinedArgs e) { ConnectedUsers.Add(e.Username, new ConnectedUser(e.Username)); await connection.SendAsync("SendTask", "SendUserAppear", e.Username); _logger.LogWarning($"New user on channel: {e.Username}"); _logger.LogWarning($"Total user on channel: {ConnectedUsers.Count}"); }
private void Client_OnUserJoined(object sender, TwitchLib.Client.Events.OnUserJoinedArgs e) { if (BotUsers.Contains(e.Username)) { return; } try { //_twitchClient.SendMessage(TwitchInfo.ChannelName, $"Welcome on my channel, { e.Username }."); LogUserJoinedChatToDb(e); UsersOnline.Add(e.Username); } catch (Exception ex) { Console.WriteLine(ex.Message); } }