mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-18 15:20:15 +01:00
Add documentation for #[command(hide)]
This commit is contained in:
parent
f6595383c4
commit
3b9f54c826
1 changed files with 4 additions and 2 deletions
|
@ -168,14 +168,16 @@ pub use teloxide_macros::BotCommands;
|
||||||
/// `rename_rule`).
|
/// `rename_rule`).
|
||||||
///
|
///
|
||||||
/// 3. `#[command(description = "description")]`
|
/// 3. `#[command(description = "description")]`
|
||||||
/// Give your command a description. Write `"off"` for `"description"` to hide a
|
/// Give your command a description. It will be shown in the help message.
|
||||||
/// command.
|
|
||||||
///
|
///
|
||||||
/// 4. `#[command(parse_with = "parser")]`
|
/// 4. `#[command(parse_with = "parser")]`
|
||||||
/// Parse arguments of one command with a given parser. `parser` must be a
|
/// Parse arguments of one command with a given parser. `parser` must be a
|
||||||
/// function of the signature `fn(String) -> Result<Tuple, ParseError>`, where
|
/// function of the signature `fn(String) -> Result<Tuple, ParseError>`, where
|
||||||
/// `Tuple` corresponds to the variant's arguments.
|
/// `Tuple` corresponds to the variant's arguments.
|
||||||
///
|
///
|
||||||
|
/// 5. `#[command(hide)]`
|
||||||
|
/// Hide a command from the help message. It will still be parsed.
|
||||||
|
///
|
||||||
/// ## Example
|
/// ## Example
|
||||||
/// ```
|
/// ```
|
||||||
/// # #[cfg(feature = "macros")] {
|
/// # #[cfg(feature = "macros")] {
|
||||||
|
|
Loading…
Reference in a new issue