MessagingExtensionAction 类

消息传递扩展操作

通过分析和验证关键字参数中的输入数据来创建新模型。

引发 [ValidationError][pydantic_core。如果无法验证输入数据以形成有效的模型,则 ValidationError]。

self 是显式位置仅允许 自己 作为字段名称。

构造函数

MessagingExtensionAction(*, data: Any | None = None, context: TaskModuleRequestContext | None = None, tabContext: TabEntityContext | None = None, commandId: str | None = None, commandContext: Literal['message', 'compose', 'commandbox'], botMessagePreviewAction: Literal['edit', 'send'] | None = None, botActivityPreview: List[Activity] | None = None, messagePayload: Message | None = None, **extra_data: Any)

仅限关键字的参数

名称 说明
data
默认值: None
context
默认值: None
tabContext
默认值: None
commandId
默认值: None
commandContext
必需
botMessagePreviewAction
默认值: None
botActivityPreview
默认值: None
messagePayload
默认值: None

属性

bot_activity_preview

机器人活动预览

bot_activity_preview: List[ActivityBase] | None

bot_message_preview_action

用户执行的机器人消息预览操作。

bot_message_preview_action: Literal['edit', 'send'] | None

command_context

命令源自的上下文。

command_context: Literal['message', 'compose', 'commandbox']

command_id

Bot 分配的命令的 ID

command_id: str | None

message_payload

作为命令请求的一部分发送的消息内容。

message_payload: Message | None

model_config

模型的配置应为符合 [ConfigDict][pydantic.config的字典。ConfigDict]。

model_config: ClassVar[ConfigDict] = {'alias_generator': AliasGenerator(alias=None, validation_alias=<staticmethod(<function CustomBaseModel.validation_alias_generator>)>, serialization_alias=<staticmethod(<function CustomBaseModel.serialization_alias_generator>)>), 'arbitrary_types_allowed': True, 'extra': 'allow', 'populate_by_name': True, 'serialize_by_alias': True, 'validate_by_alias': True, 'validate_by_name': True}