create
suspend fun QGCommandPanelManager.create(scope: CommandPanelScope? = null, targetType: CommandPanelTargetType? = null, userOpenids: Collection<ID>? = null, groupOpenids: Collection<ID>? = null, panel: CommandPanel? = null): QGCommandPanelHandle(source)
创建一个指令面板。
创建接口只返回新面板 ID,因此本方法只返回带 ID 的句柄,不隐式查询详情。
Since
5.0
Parameters
scope
指令面板生效的会话场景。
targetType
指令面板的目标范围类型。
userOpenids
C2C 用户 OpenID 列表,仅 c2c 场景且 target_type=specific 时有效。
groupOpenids
群 OpenID 列表,仅 group 场景且 target_type=specific 时有效。
panel
面板配置内容,定义面板中展示的指令和链接项
Throws
请求被 QQ API 拒绝时抛出。
inline suspend fun QGCommandPanelManager.create(block: CommandPanelCreateBuilder.() -> Unit): QGCommandPanelHandle(source)
使用 CommandPanelCreateBuilder DSL 创建一个指令面板。
Since
5.0