From e1e0c9a24c0bc5778eabe3ef1da0f92d3688eb3b Mon Sep 17 00:00:00 2001 From: Tsvetozar Penov Date: Tue, 18 Jul 2023 09:55:35 +0200 Subject: [PATCH] Trim discord message further below 2K since it fails with chars limit sometimes --- lib/sanbase/discord/command_handler.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sanbase/discord/command_handler.ex b/lib/sanbase/discord/command_handler.ex index 3239eaeccf..7c56a36617 100644 --- a/lib/sanbase/discord/command_handler.ex +++ b/lib/sanbase/discord/command_handler.ex @@ -1402,8 +1402,8 @@ defmodule Sanbase.Discord.CommandHandler do end def trim_message(message) do - if String.length(message) > 1990 do - String.slice(message, 0, 1990) <> "..." + if String.length(message) > 1900 do + String.slice(message, 0, 1900) <> "... (message truncated)" else message end