From 0784524e1e863a812679541872dc1ec8f27978a6 Mon Sep 17 00:00:00 2001 From: FloatingMilkshake Date: Tue, 17 Oct 2023 21:04:36 -0400 Subject: [PATCH] Don't touch joinwatch notes list if note is empty Avoids creating an empty entry in the list, which breaks the joinwatch embed --- Commands/Lists.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Commands/Lists.cs b/Commands/Lists.cs index 128426e3..439cf675 100644 --- a/Commands/Lists.cs +++ b/Commands/Lists.cs @@ -207,7 +207,8 @@ public async Task JoinWatch( { // User is not joinwatched, watch await Program.db.ListRightPushAsync("joinWatchedUsers", user.Id); - await Program.db.HashSetAsync("joinWatchedUsersNotes", user.Id, note); + if (note != "") + await Program.db.HashSetAsync("joinWatchedUsersNotes", user.Id, note); await ctx.RespondAsync($"{Program.cfgjson.Emoji.Success} Now watching for joins/leaves of {user.Mention} to send to the investigations channel" + (note == "" ? "!" : $" with the following note:\n>>> {note}")); }