mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Merge pull request #95 from teloxide/get_set_my_commands_ret_fixt
Fix rt-tys of `{get,set}_my_commands` methods
This commit is contained in:
commit
ec2dc01993
2 changed files with 5 additions and 3 deletions
|
@ -8,12 +8,14 @@
|
|||
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::BotCommand;
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to get the current list of the bot's commands. Requires no parameters. Returns Array of [`BotCommand`] on success.
|
||||
///
|
||||
/// [`BotCommand`]: crate::types::BotCommand
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Default, Clone, Serialize)]
|
||||
pub GetMyCommands (GetMyCommandsSetters) => u32 {
|
||||
pub GetMyCommands (GetMyCommandsSetters) => Vec<BotCommand> {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::BotCommand;
|
||||
use crate::types::{BotCommand, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to change the list of the bot's commands. Returns _True_ on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub SetMyCommands (SetMyCommandsSetters) => u32 {
|
||||
pub SetMyCommands (SetMyCommandsSetters) => True {
|
||||
required {
|
||||
/// A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.
|
||||
pub commands: Vec<BotCommand> [collect],
|
||||
|
|
Loading…
Add table
Reference in a new issue