From ce11ee487f89f123efb98390f1159d2ea54e9e47 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 9 Mar 2021 23:24:28 +0300 Subject: [PATCH] add new error type --- src/bot/deliver_job.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bot/deliver_job.rs b/src/bot/deliver_job.rs index b7ca7212..c2e8fe9a 100644 --- a/src/bot/deliver_job.rs +++ b/src/bot/deliver_job.rs @@ -17,7 +17,7 @@ use serde_json::value::Map; use std::time::Duration; use tokio::time; -static TELEGRAM_ERRORS: [&'static str; 12] = [ +static TELEGRAM_ERRORS: [&'static str; 13] = [ "Forbidden: bot was blocked by the user", "Bad Request: chat not found", "Forbidden: bot was kicked from the supergroup chat", @@ -30,6 +30,7 @@ static TELEGRAM_ERRORS: [&'static str; 12] = [ "Bad Request: have no rights to send a message", "Bad Request: group chat was upgraded to a supergroup chat, migrate to chat id", "Bad Request: CHAT_WRITE_FORBIDDEN", + "Bad Request: need administrator rights in the channel chat", ]; static DISCRIPTION_LIMIT: usize = 2500;