Merge pull request #1157 from jdertmann/add-api-error-variant

Add BotKickedFromChannel variant to ApiError
This commit is contained in:
Tima Kinsart 2024-08-29 01:56:24 +00:00 committed by GitHub
commit cf2b01d877
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -42,6 +42,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `BusinessMessagesDeleted` struct - Add `BusinessMessagesDeleted` struct
- Add `BusinessConnection`, `BusinessMessage`, `EditedBusinessMessage` and `DeletedBusinessMessages` variants to `UpdateKind` enum - Add `BusinessConnection`, `BusinessMessage`, `EditedBusinessMessage` and `DeletedBusinessMessages` variants to `UpdateKind` enum
- `ApiError::BotKickedFromChannel` ([#1157][pr1157])
[pr1157]: https://github.com/teloxide/teloxide/pull/1157
### Changed ### Changed
- `MaybeAnonymousUser` type introduced, which replaced `PollAnswer::voter: Voter` and `MessageReactionUpdated::{user, actor_chat}` in `MessageReactionUpdated`([#1134][pr1134]) - `MaybeAnonymousUser` type introduced, which replaced `PollAnswer::voter: Voter` and `MessageReactionUpdated::{user, actor_chat}` in `MessageReactionUpdated`([#1134][pr1134])

View file

@ -644,6 +644,15 @@ impl_api_error! {
/// [`SendMessage`]: crate::payloads::SendMessage /// [`SendMessage`]: crate::payloads::SendMessage
BotKickedFromSupergroup = "Forbidden: bot was kicked from the supergroup chat", BotKickedFromSupergroup = "Forbidden: bot was kicked from the supergroup chat",
/// Occurs when bot tries to do something in a channel the bot was
/// kicked from.
///
/// May happen in methods:
/// 1. [`SendMessage`]
///
/// [`SendMessage`]: crate::payloads::SendMessage
BotKickedFromChannel = "Forbidden: bot was kicked from the channel chat",
/// Occurs when bot tries to send a message to a deactivated user (i.e. a /// Occurs when bot tries to send a message to a deactivated user (i.e. a
/// user that was banned by telegram). /// user that was banned by telegram).
/// ///