Skip to content

Commit

Permalink
feat(ConnectionLogs): no npcs on round start
Browse files Browse the repository at this point in the history
  • Loading branch information
JayXTQ committed Nov 25, 2024
1 parent b9fdafb commit b4fec55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DiscordLab.ConnectionLogs/Handlers/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ private void OnRoundStarted()
Log.Error("Either the guild is null or the channel is null. So the round start message has failed to send.");
return;
}
string players = string.Join("\n", Player.List.Select(player => Plugin.Instance.Translation.RoundStartPlayers.Replace("{playername}", player.Nickname).Replace("{playerid}", player.UserId).Replace("{ip}", player.IPAddress)));

List<Player> playerList = Player.List.Where(p => !p.IsNPC).ToList();
string players = string.Join("\n", playerList.Select(player => Plugin.Instance.Translation.RoundStartPlayers.Replace("{playername}", player.Nickname).Replace("{playerid}", player.UserId).Replace("{ip}", player.IPAddress)));
channel.SendMessageAsync(message.Replace("{players}", players));
}
}
Expand Down

0 comments on commit b4fec55

Please sign in to comment.