mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Document new command renaming rules
This commit is contained in:
parent
a4c147538b
commit
85a04553a5
2 changed files with 5 additions and 3 deletions
|
@ -59,7 +59,7 @@ full = [
|
|||
|
||||
[dependencies]
|
||||
teloxide-core = { version = "0.4", default-features = false }
|
||||
teloxide-macros = { version = "0.5", optional = true }
|
||||
teloxide-macros = { version = "0.5.1", optional = true }
|
||||
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
|
|
@ -78,8 +78,10 @@ pub use teloxide_macros::BotCommand;
|
|||
///
|
||||
/// # Enum attributes
|
||||
/// 1. `#[command(rename = "rule")]`
|
||||
/// Rename all commands by `rule`. Allowed rules are `lowercase`. If you will
|
||||
/// not use this attribute, commands will be parsed by their original names.
|
||||
/// Rename all commands by `rule`. If you will not use this attribute, commands
|
||||
/// will be parsed by their original names. Allowed rules are `lowercase`,
|
||||
/// `UPPERCASE`, `PascalCase`, `camelCase`, `snake_case`,
|
||||
/// `SCREAMING_SNAKE_CASE`, `kebab-case`, and `SCREAMING-KEBAB-CASE`.
|
||||
///
|
||||
/// 2. `#[command(prefix = "prefix")]`
|
||||
/// Change a prefix for all commands (the default is `/`).
|
||||
|
|
Loading…
Reference in a new issue