prefer shortened linq update (#2093)

This commit is contained in:
Sean
2022-02-12 01:45:54 +00:00
committed by GitHub
parent 01735c82fb
commit 69da238a0f

View File

@@ -111,9 +111,9 @@ _client.ModalSubmitted += async modal =>
List<SocketMessageComponentData> components =
modal.Data.Components.ToList();
string food = components
.Where(x => x.CustomId == "food_name").First().Value;
.First(x => x.CustomId == "food_name").Value;
string reason = components
.Where(x => x.CustomId == "food_reason").First().Value;
.First(x => x.CustomId == "food_reason").Value;
// Build the message to send.
string message = "hey @everyone; I just learned " +