Document new command renaming rules

This commit is contained in:
Hirrolot 2022-03-23 08:03:15 +06:00
parent a4c147538b
commit 85a04553a5
2 changed files with 5 additions and 3 deletions

View file

@ -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"] }

View file

@ -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 `/`).