diff --git a/src/onebot/api/quick-action.ts b/src/onebot/api/quick-action.ts index 17871c69..b8c4c2f0 100644 --- a/src/onebot/api/quick-action.ts +++ b/src/onebot/api/quick-action.ts @@ -78,7 +78,7 @@ export class OneBotQuickActionApi { sendElements, deleteAfterSentFiles, } = await this.obContext.apis.MsgApi.createSendElements(replyMessage, peer); - this.obContext.apis.MsgApi.sendMsgWithOb11UniqueId(peer, sendElements, deleteAfterSentFiles, false).then().catch(this.core.context.logger.logError); + this.obContext.apis.MsgApi.sendMsgWithOb11UniqueId(peer, sendElements, deleteAfterSentFiles, false).then().catch(this.core.context.logger.logError.bind(this.core.context.logger)); } } @@ -88,13 +88,13 @@ export class OneBotQuickActionApi { request.flag, quickAction.approve ? GroupRequestOperateTypes.approve : GroupRequestOperateTypes.reject, quickAction.reason, - ).catch(this.core.context.logger.logError); + ).catch(this.core.context.logger.logError.bind(this.core.context.logger)); } } async handleFriendRequest(request: OB11FriendRequestEvent, quickAction: QuickActionFriendRequest) { if (!isNull(quickAction.approve)) { - this.core.apis.FriendApi.handleFriendRequest(request.flag, !!quickAction.approve).then().catch(this.core.context.logger.logError); + this.core.apis.FriendApi.handleFriendRequest(request.flag, !!quickAction.approve).then().catch(this.core.context.logger.logError.bind(this.core.context.logger)); } } }