From 6e59ee1eb8a83323fb4eeaf443f06d0e811e20c8 Mon Sep 17 00:00:00 2001 From: Dogma Toscarina Date: Fri, 7 Jun 2024 02:15:51 +0300 Subject: [PATCH] utils/telegram/try_do: shorten DEMOTE_FAILURE_MESSAGE It would be annoying to get this long message spamming the chat window. Such error messages should describe what has gone wrong, but not give any guidances, advices or directions; they belong elsewhere (documentation, wiki, etc). --- src/utils/telegram/try_do.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/utils/telegram/try_do.rs b/src/utils/telegram/try_do.rs index 11b704a..ca90bc3 100644 --- a/src/utils/telegram/try_do.rs +++ b/src/utils/telegram/try_do.rs @@ -5,11 +5,8 @@ use std::future::Future; use super::demote::demote_user; -const DEMOTE_FAILURE_MESSAGE: &str = "\ - Нельзя выдать ограничение пользователю, т.к. невозможно демотнуть \ - участника посредством бота, если ему выдан админ при помощи других \ - админов или владельца чата.\ - "; +const DEMOTE_FAILURE_MESSAGE: &str = "Команда не может быть выполнена: \ + не удалось удалить административные привилегии пользователя."; pub async fn try_restrict( future_callback: F,