mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 15:01:45 +01:00
Merge pull request #155 from teloxide/not_enough_permissions_error
Add `ApiError::NotEnoughRightsToChangeChatPermissions`
This commit is contained in:
commit
1219c8fbe2
2 changed files with 13 additions and 0 deletions
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Added
|
||||
|
||||
- `ApiError::TooMuchInlineQueryResults` ([#135][pr135])
|
||||
- `ApiError::NotEnoughRightsToChangeChatPermissions` ([#155][pr155])
|
||||
- Support for 5.4 telegram bot API ([#133][pr133])
|
||||
- Support for 5.5 telegram bot API ([#143][pr143])
|
||||
- `EditedMessageIsTooLong` error ([#109][pr109])
|
||||
|
@ -27,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
[pr140]: https://github.com/teloxide/teloxide-core/pull/140
|
||||
[pr143]: https://github.com/teloxide/teloxide-core/pull/143
|
||||
[pr151]: https://github.com/teloxide/teloxide-core/pull/151
|
||||
[pr155]: https://github.com/teloxide/teloxide-core/pull/155
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -493,6 +493,17 @@ pub enum ApiError {
|
|||
#[error("Bad Request: not enough rights to manage pinned messages in the chat")]
|
||||
NotEnoughRightsToManagePins,
|
||||
|
||||
/// Occurs when bot tries change default chat permissions without "Ban
|
||||
/// Users" permission in this chat.
|
||||
///
|
||||
/// May happen in methods:
|
||||
/// 1. [`SetChatPermissions`]
|
||||
///
|
||||
/// [`SetChatPermissions`]: crate::payloads::SetChatPermissions
|
||||
#[serde(rename = "Bad Request: not enough rights to change chat permissions")]
|
||||
#[error("Bad Request: not enough rights to change chat permissions")]
|
||||
NotEnoughRightsToChangeChatPermissions,
|
||||
|
||||
/// Occurs when bot tries to use method in group which is allowed only in a
|
||||
/// supergroup or channel.
|
||||
#[serde(rename = "Bad Request: method is available only for supergroups and channel")]
|
||||
|
|
Loading…
Reference in a new issue