查看所提供的示例,了解如何在软件包 SDK 开发过程中添加 actions,并对其分组。

示例: 添加 actions
@BotCommand //CommandPks 添加可显示在 UI 上的所需信息。 @CommandPkg( //软件包内的唯一名称和显示的标签。 name = "concatenate", label = "[[Concatenate.label]]", node_label = "[[Concatenate.node_label]]", description = "[[Concatenate.description]]", icon = "pkg.svg", //返回类型信息。 return_type 确保在 UI 上仅提供正确类型的变量。 return_label = "[[Concatenate.return_label]]", return_type = STRING, return_required = true)
示例: 分组 actions

使用 group_label ConcatenateGroup,在用户界面也显示为 ConcatenateGroup。 在未使用 group_label 时,您将获得相应软件包中的所有操作。

@BotCommand //CommandPks 添加可显示在 UI 上的所需信息。 @CommandPkg( //软件包内的唯一名称和显示的标签。group_label = "ConcatenateGroup", name = "concatenateWithGroup", label = "concatenateWithGroup", node_label = "[[Concatenate.node_label]]", description = "[[Concatenate.description]]", icon = "pkg.svg", //返回类型信息。return_type 确保在 UI 上仅提供正确类型的变量。return_label = "[[Concatenate.return_label]]", return_type = STRING, return_required = true) public class ConcatenateWithGroup {