From c0a6e00520b20117440c7bdd17168e8ede1baf80 Mon Sep 17 00:00:00 2001 From: TheAwiteb Date: Thu, 14 Sep 2023 12:09:50 +0300 Subject: [PATCH] Check if the value of description `is_doc` false before update it --- crates/teloxide-macros/src/command_attr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/teloxide-macros/src/command_attr.rs b/crates/teloxide-macros/src/command_attr.rs index 3e7a6592..5bff3d76 100644 --- a/crates/teloxide-macros/src/command_attr.rs +++ b/crates/teloxide-macros/src/command_attr.rs @@ -99,7 +99,7 @@ impl CommandAttrs { d.strip_prefix(' ').unwrap_or(&d), attr.sp, ); - if is_doc { + if is_doc && matches!(this.description, Some((_, false, _))) { if let Some((_, is_doc, _)) = &mut this.description { *is_doc = true; }