getBot

fun getBot(id: ID, component: Component): Bot?

根据一个Bot的id以及对应的组件对象来得到一个此组件下指定ID的bot。如果manager不存在或者没有这个id的bot,则会得到null。

Parameters

id

Bot的id

component

fun getBot(id: ID, componentId: String? = null): Bot

根据一个Bot的id以及对应的组件ID来得到一个此组件下指定ID的bot。如果manager不存在或者没有这个id的bot,则会抛出 NoSuchElementException

如果提供的 组件ID 为null,则会尝试寻找第一个id匹配的bot。

Parameters

id

Bot的id

componentId

Throws