From 716c4ccf584f8b8df104e03ef95717ac31bf1214 Mon Sep 17 00:00:00 2001 From: Kaz Wolfe Date: Tue, 2 Jul 2024 16:28:58 -0700 Subject: [PATCH] fix: flush the final buffer --- Plogon/DiscordWebhook.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Plogon/DiscordWebhook.cs b/Plogon/DiscordWebhook.cs index 1cd8de2..502b53a 100644 --- a/Plogon/DiscordWebhook.cs +++ b/Plogon/DiscordWebhook.cs @@ -76,12 +76,15 @@ public async Task SendSplitting(Color color, string message, string title, strin { if (buffer.Length + part.Length > 2000) { - messages.Add(buffer); + messages.Add(buffer.Trim()); buffer = ""; } buffer += part + "\n"; } + + // flush final buffer + messages.Add(buffer.Trim()); foreach (var body in messages) {