File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
astrbot/core/pipeline/respond Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,21 @@ class RespondStage(Stage):
3333 Comp .Nodes : lambda comp : bool (comp .nodes ), # 多个转发节点
3434 Comp .File : lambda comp : bool (comp .file_ or comp .url ),
3535 Comp .WechatEmoji : lambda comp : comp .md5 is not None , # 微信表情
36+ Comp .Json : lambda comp : bool (comp .data ), # Json 卡片
37+ Comp .Share : lambda comp : bool (comp .url ) or bool (comp .title ),
38+ Comp .Music : lambda comp : (
39+ (comp .id and comp ._type and comp ._type != "custom" )
40+ or (comp ._type == "custom" and comp .url and comp .audio and comp .title )
41+ ), # 音乐分享
42+ Comp .Forward : lambda comp : bool (comp .id ), # 合并转发
43+ Comp .Location : lambda comp : bool (
44+ comp .lat is not None and comp .lon is not None
45+ ), # 位置
46+ Comp .Contact : lambda comp : bool (comp ._type and comp .id ), # 推荐好友 or 群
47+ Comp .Shake : lambda _ : True , # 窗口抖动(戳一戳)
48+ Comp .Dice : lambda _ : True , # 掷骰子魔法表情
49+ Comp .RPS : lambda _ : True , # 猜拳魔法表情
50+ Comp .Unknown : lambda comp : bool (comp .text and comp .text .strip ()),
3651 }
3752
3853 async def initialize (self , ctx : PipelineContext ) -> None :
You can’t perform that action at this time.
0 commit comments