mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Merge pull request #79 from teloxide/fix_rt_tys
Fix return types of methods
This commit is contained in:
commit
7c8df5412c
8 changed files with 16 additions and 14 deletions
|
@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
|
||||
- Output types of `LeaveChat` `PinChatMessage`, `SetChatDescription`, `SetChatPhoto` `SetChatTitle`, `UnpinAllChatMessages` and `UnpinChatMessage`: `String` => `True` ([#79][pr79])
|
||||
- `SendChatAction` output type `Message` => `True` ([#75][pr75])
|
||||
- `GetChatAdministrators` output type `ChatMember` => `Vec<ChatMember>` ([#73][pr73])
|
||||
- `reqwest` dependency bringing `native-tls` in even when `rustls` was selected ([#71][pr71])
|
||||
|
@ -32,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
[pr71]: https://github.com/teloxide/teloxide-core/pull/71
|
||||
[pr73]: https://github.com/teloxide/teloxide-core/pull/73
|
||||
[pr75]: https://github.com/teloxide/teloxide-core/pull/75
|
||||
[pr79]: https://github.com/teloxide/teloxide-core/pull/79
|
||||
|
||||
## [0.2.2] - 2020-03-22
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::ChatId;
|
||||
use crate::types::{ChatId, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method for your bot to leave a group, supergroup or channel. Returns _True_ on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub LeaveChat (LeaveChatSetters) => String {
|
||||
pub LeaveChat (LeaveChatSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: ChatId [into],
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::ChatId;
|
||||
use crate::types::{ChatId, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel. Returns _True_ on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub PinChatMessage (PinChatMessageSetters) => String {
|
||||
pub PinChatMessage (PinChatMessageSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: ChatId [into],
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::ChatId;
|
||||
use crate::types::{ChatId, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns _True_ on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub SetChatDescription (SetChatDescriptionSetters) => String {
|
||||
pub SetChatDescription (SetChatDescriptionSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: ChatId [into],
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::{ChatId, InputFile};
|
||||
use crate::types::{ChatId, InputFile, True};
|
||||
|
||||
impl_payload! {
|
||||
@[multipart]
|
||||
/// Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns _True_ on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub SetChatPhoto (SetChatPhotoSetters) => String {
|
||||
pub SetChatPhoto (SetChatPhotoSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: ChatId [into],
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::ChatId;
|
||||
use crate::types::{ChatId, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns _True_ on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub SetChatTitle (SetChatTitleSetters) => String {
|
||||
pub SetChatTitle (SetChatTitleSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: ChatId [into],
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::ChatId;
|
||||
use crate::types::{ChatId, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns _True_ on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub UnpinAllChatMessages (UnpinAllChatMessagesSetters) => String {
|
||||
pub UnpinAllChatMessages (UnpinAllChatMessagesSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: ChatId [into],
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::types::ChatId;
|
||||
use crate::types::{ChatId, True};
|
||||
|
||||
impl_payload! {
|
||||
/// Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns _True_ on success.
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||
pub UnpinChatMessage (UnpinChatMessageSetters) => String {
|
||||
pub UnpinChatMessage (UnpinChatMessageSetters) => True {
|
||||
required {
|
||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||
pub chat_id: ChatId [into],
|
||||
|
|
Loading…
Add table
Reference in a new issue