Simple Robot
Toggle table of contents
5.0.0-Alpha2
common
Target filter
common
Switch theme
Search in API
Skip to content
Simple Robot
simbot-component-qq-api
/
love.forte.simbot.qguild.model.menu
/
CustomMenuItemBuilder
/
switch
switch
fun
switch
(
switch
:
CustomMenu.Switch
?
)
:
CustomMenuItemBuilder
(
source
)
直接设置开关配置。
fun
switch
(
switchId
:
String
?
=
null
,
defaultValue
:
Boolean
?
=
null
)
:
CustomMenuItemBuilder
(
source
)
通过参数设置开关配置。
fun
switch
(
block
:
CustomMenuSwitchBuilder
.
(
)
->
Unit
)
:
CustomMenuItemBuilder
(
source
)
通过 DSL 设置开关配置。
var
switch
:
CustomMenu.Switch
?
(
source
)
开关菜单项的开关配置。