class ActionCard extends Message

跳转ActionCard类型

Properties

protected string $type 消息类型 from  Message
protected array $atMobiles 被@人的手机号(在content里添加@人的手机号) from  Message
protected bool $isAll 是否@所有人 from  Message
protected array $message 最终消息结构体 from  Message

Methods

setAtMobiles(array $at)

设置需要at的人,默认只有Text和Markdown支持

from  Message
setIsAll(bool $is_all)

是否at全体成员

from  Message
string
toJson()

最终输出的结构体JSON

string
formatContent(string $content)

格式化消息体

from  Message
__construct(string $title, string $text, array $buttons, bool $isVertical = false)

ActionCard constructor.

Details

in Message at line 45
Message setAtMobiles(array $at)

设置需要at的人,默认只有Text和Markdown支持

Parameters

array $at

Return Value

Message

in Message at line 57
Message setIsAll(bool $is_all)

是否at全体成员

Parameters

bool $is_all

Return Value

Message

at line 53
string toJson()

最终输出的结构体JSON

Return Value

string

in Message at line 90
protected string formatContent(string $content)

格式化消息体

Parameters

string $content

Return Value

string

at line 39
__construct(string $title, string $text, array $buttons, bool $isVertical = false)

ActionCard constructor.

Parameters

string $title 首屏会话透出的展示内容
string $text markdown格式的消息
array $buttons

按钮的标题和点击按钮触发的URL [['title'=>'url']]

bool $isVertical 按钮排列方式是否为竖排,默认是横排