mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Add BotCommand::bot_commands
This commit is contained in:
parent
bde566825f
commit
07b844db99
3 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## unreleased
|
## unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- `BotCommand::bot_commands` to obtain Telegram API commands ([issue 262](https://github.com/teloxide/teloxide/issues/262)).
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Require that `AsUpdateStream::Stream` is `Send`
|
- Require that `AsUpdateStream::Stream` is `Send`
|
||||||
|
|
|
@ -58,7 +58,7 @@ full = [
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
teloxide-core = { version = "0.4", default-features = false }
|
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_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
|
|
@ -212,6 +212,7 @@ pub trait BotCommand: Sized {
|
||||||
fn ty() -> PhantomData<Self> {
|
fn ty() -> PhantomData<Self> {
|
||||||
PhantomData
|
PhantomData
|
||||||
}
|
}
|
||||||
|
fn bot_commands() -> Vec<crate::types::BotCommand>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type PrefixedBotCommand = String;
|
pub type PrefixedBotCommand = String;
|
||||||
|
|
Loading…
Reference in a new issue