mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 07:25:36 +01:00
Update invalid token check to match new error message
This commit is contained in:
@@ -187,7 +187,7 @@ impl BotsManager {
|
|||||||
Err(err) => {
|
Err(err) => {
|
||||||
let error_message = err.to_string();
|
let error_message = err.to_string();
|
||||||
|
|
||||||
if error_message.contains("Api(InvalidToken)") {
|
if error_message.contains("Invalid bot token") {
|
||||||
BOTS_DATA.invalidate(token.as_str()).await;
|
BOTS_DATA.invalidate(token.as_str()).await;
|
||||||
if let Err(d_err) = delete_bot(bot_data.id).await {
|
if let Err(d_err) = delete_bot(bot_data.id).await {
|
||||||
log::error!("Error deleting bot {}: {:?}", bot_data.id, d_err);
|
log::error!("Error deleting bot {}: {:?}", bot_data.id, d_err);
|
||||||
|
|||||||
Reference in New Issue
Block a user