diff --git a/CHANGELOG.md b/CHANGELOG.md index ef720696..2a064f6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## unreleased +### Added + + - `BotCommand::bot_commands` to obtain Telegram API commands ([issue 262](https://github.com/teloxide/teloxide/issues/262)). + ### Changed - Require that `AsUpdateStream::Stream` is `Send` diff --git a/Cargo.toml b/Cargo.toml index a4fb8abc..65390328 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ full = [ [dependencies] teloxide-core = { version = "0.4", default-features = false } -teloxide-macros = { git = "https://github.com/teloxide/teloxide-macros.git", rev = "57d3e266fa25a6ee2ccbfe140016cdb5d3223147", optional = true } +teloxide-macros = { git = "https://github.com/teloxide/teloxide-macros.git", optional = true } serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } diff --git a/src/utils/command.rs b/src/utils/command.rs index 12d45220..35023099 100644 --- a/src/utils/command.rs +++ b/src/utils/command.rs @@ -212,6 +212,7 @@ pub trait BotCommand: Sized { fn ty() -> PhantomData { PhantomData } + fn bot_commands() -> Vec; } pub type PrefixedBotCommand = String;