Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions astrbot/core/platform/sources/telegram/tg_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from telegram import BotCommand, Update
from telegram.constants import ChatType
from telegram.error import InvalidToken, Unauthorized
from telegram.error import Forbidden, InvalidToken
from telegram.ext import ApplicationBuilder, ContextTypes, ExtBot, filters
from telegram.ext import MessageHandler as TelegramMessageHandler

Expand Down Expand Up @@ -183,7 +183,7 @@ async def run(self) -> None:
)
except asyncio.CancelledError:
raise
except (Unauthorized, InvalidToken) as e:
except (Forbidden, InvalidToken) as e:
logger.error(
f"Telegram token is invalid or unauthorized: {e}. Polling stopped."
)
Expand Down
Loading