diff --git a/astrbot/core/platform/sources/telegram/tg_adapter.py b/astrbot/core/platform/sources/telegram/tg_adapter.py index 93ed6feb6..b12478d5f 100644 --- a/astrbot/core/platform/sources/telegram/tg_adapter.py +++ b/astrbot/core/platform/sources/telegram/tg_adapter.py @@ -133,7 +133,11 @@ class TelegramPlatformAdapter(Platform): message.message_str = "" message.message = [] - if update.message.reply_to_message: + if update.message.reply_to_message and not ( + update.message.is_topic_message + and update.message.message_thread_id + == update.message.reply_to_message.message_id + ): # 获取回复消息 reply_update = Update( update_id=1, @@ -199,6 +203,15 @@ class TelegramPlatformAdapter(Platform): ] message.message.append(Comp.At(qq=name, name=name)) + elif update.message.sticker: + # 将sticker当作图片处理 + file = await update.message.sticker.get_file() + message.message.append(Comp.Image(file=file.file_path, url=file.file_path)) + if update.message.sticker.emoji: + sticker_text = f"Sticker: {update.message.sticker.emoji}" + message.message_str = sticker_text + message.message.append(Comp.Plain(sticker_text)) + elif update.message.document: file = await update.message.document.get_file() message.message = [