Skip to content

Commit

Permalink
🐛 fix: telegram cannot handle /start #620
Browse files Browse the repository at this point in the history
  • Loading branch information
Soulter committed Mar 4, 2025
1 parent 7d58c2c commit 41cee57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion astrbot/core/platform/sources/telegram/tg_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from telegram import Update
from telegram.ext import ApplicationBuilder, ContextTypes, filters
from telegram.constants import ChatType
from telegram.ext import MessageHandler as TelegramMessageHandler
from telegram.ext import MessageHandler as TelegramMessageHandler, CommandHandler
from .tg_event import TelegramPlatformEvent
from astrbot.api import logger
from telegram.ext import ExtBot
Expand Down Expand Up @@ -131,6 +131,10 @@ async def convert_message(
message.message.append(Plain(plain_text))
message.message_str = plain_text

if message.message_str == "/start":
await self.start(update, context)
return

elif update.message.voice:
file = await update.message.voice.get_file()
message.message = [
Expand Down

0 comments on commit 41cee57

Please sign in to comment.