From 15e7d766a2e7eeda6f175b078cadaf57e0a912d7 Mon Sep 17 00:00:00 2001 From: Noikoio Date: Wed, 30 Jan 2019 21:19:16 -0800 Subject: [PATCH] Clean up birthday announce messages --- BirthdayBot/BackgroundWorker.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BirthdayBot/BackgroundWorker.vb b/BirthdayBot/BackgroundWorker.vb index c1f2bec..02c34f3 100644 --- a/BirthdayBot/BackgroundWorker.vb +++ b/BirthdayBot/BackgroundWorker.vb @@ -220,7 +220,9 @@ Class BackgroundWorker ' Build name list Dim namedisplay As New StringBuilder() Dim first = True - For Each item In names + Dim sortedNames = names.ToArray() + Array.Sort(sortedNames) + For Each item In sortedNames If Not first Then namedisplay.Append(", ") End If @@ -233,7 +235,7 @@ Class BackgroundWorker End If namedisplay.Append("**" + name + "**") Next - result = $"Please wish our esteemed members a happy birthday!{vbLf}In no particular order: {namedisplay.ToString()}" + result = $"Please wish our esteemed members a happy birthday: {namedisplay.ToString()}." End If Try