Update crates/teloxide-macros/src/command.rs

Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
This commit is contained in:
Awiteb 2023-03-07 13:27:12 +03:00 committed by GitHub
parent 178a6cf957
commit 52f3c052c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,9 @@ impl Command {
let prefix = prefix.map(|(p, _)| p).unwrap_or_else(|| global_options.prefix.clone());
let description = description.map(|(d, _)| d);
let parser = parser.map(|(p, _)| p).unwrap_or_else(|| global_options.parser_type.clone());
Ok(Self { prefix, description, parser, name, hidden: hide.is_some() })
let hidden = hide.is_some();
Ok(Self { prefix, description, parser, name, hidden })
}
pub fn get_prefixed_command(&self) -> String {