fix: method signature of _handle

This commit is contained in:
Wesley F. Young
2024-08-10 22:22:52 +08:00
parent ad7dc3b6b5
commit bde27518c8
69 changed files with 97 additions and 78 deletions

View File

@@ -8,7 +8,7 @@ interface ReturnType {
export default class CanSendRecord extends BaseAction<any, ReturnType> {
actionName = ActionName.CanSendRecord;
protected async _handle(_payload: void): Promise<ReturnType> {
async _handle(_payload: void): Promise<ReturnType> {
return {
yes: true,
};

View File

@@ -6,7 +6,7 @@ import { ActionName } from '../types';
class GetLoginInfo extends BaseAction<null, OB11User> {
actionName = ActionName.GetLoginInfo;
protected async _handle(payload: null) {
async _handle(payload: null) {
return OB11Constructor.selfInfo(this.CoreContext.selfInfo);
}
}

View File

@@ -4,7 +4,7 @@ import { ActionName } from '../types';
export default class GetStatus extends BaseAction<any, any> {
actionName = ActionName.GetStatus;
protected async _handle(payload: any): Promise<any> {
async _handle(payload: any): Promise<any> {
return {
online: !!this.CoreContext.selfInfo.online,
good: true,

View File

@@ -5,7 +5,7 @@ import { napcat_version } from '@/common/framework/napcat';
export default class GetVersionInfo extends BaseAction<any, any> {
actionName = ActionName.GetVersionInfo;
protected async _handle(payload: any): Promise<any> {
async _handle(payload: any): Promise<any> {
return {
app_name: 'NapCat.Onebot',
protocol_version: 'v11',