From d3be288ebaa8ac0b1ede2fb9d3170967238f9834 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Sun, 10 Oct 2021 14:25:49 +0300 Subject: [PATCH] Add `NotEnoughRightsToPostMessages` error --- src/errors.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/errors.rs b/src/errors.rs index 7241dbb7..9fd05a58 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -434,6 +434,11 @@ pub enum ApiError { #[serde(rename = "Bad Request: not enough rights to restrict/unrestrict chat member")] NotEnoughRightsToRestrict, + /// Occurs when bot tries to post a message in a channel without "Post + /// Messages" admin right. + #[serde(rename = "Bad Request: need administrator rights in the channel chat")] + NotEnoughRightsToPostMessages, + /// Occurs when bot tries set webhook to protocol other than HTTPS. /// /// May happen in methods: