允许以仅用于调用方法的模式进行部分对象的实例化
This commit is contained in:
@@ -19,6 +19,11 @@ export default class Chat extends BaseClientObject {
|
||||
* 实例化方法
|
||||
* ================================================
|
||||
*/
|
||||
static getForInvokeOnlyById(client: LingChairClient, id: string) {
|
||||
return new Chat(client, {
|
||||
id
|
||||
} as ChatBean)
|
||||
}
|
||||
static async getById(client: LingChairClient, id: string) {
|
||||
try {
|
||||
return await this.getByIdOrThrow(client, id)
|
||||
|
||||
Reference in New Issue
Block a user