mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-23 07:09:34 +01:00
Update crates/teloxide-macros/src/command.rs
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
This commit is contained in:
parent
3ea562dcda
commit
c7c6b029b0
1 changed files with 3 additions and 1 deletions
|
@ -49,7 +49,9 @@ impl Command {
|
||||||
let prefix = prefix.map(|(p, _)| p).unwrap_or_else(|| global_options.prefix.clone());
|
let prefix = prefix.map(|(p, _)| p).unwrap_or_else(|| global_options.prefix.clone());
|
||||||
let description = description.map(|(d, _)| d);
|
let description = description.map(|(d, _)| d);
|
||||||
let parser = parser.map(|(p, _)| p).unwrap_or_else(|| global_options.parser_type.clone());
|
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 {
|
pub fn get_prefixed_command(&self) -> String {
|
||||||
|
|
Loading…
Add table
Reference in a new issue