mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
feat: new api
This commit is contained in:
@@ -34,7 +34,7 @@ import SetGroupAdmin from './group/SetGroupAdmin';
|
||||
import SetGroupCard from './group/SetGroupCard';
|
||||
import GetImage from './file/GetImage';
|
||||
import GetRecord from './file/GetRecord';
|
||||
import { GoCQHTTPMarkMsgAsRead, MarkGroupMsgAsRead, MarkPrivateMsgAsRead } from './msg/MarkMsgAsRead';
|
||||
import { GoCQHTTPMarkMsgAsRead, MarkAllMsgAsRead, MarkGroupMsgAsRead, MarkPrivateMsgAsRead } from './msg/MarkMsgAsRead';
|
||||
import CleanCache from './system/CleanCache';
|
||||
import GoCQHTTPUploadGroupFile from './go-cqhttp/UploadGroupFile';
|
||||
import { GetConfigAction, SetConfigAction } from '@/onebot11/action/extends/Config';
|
||||
@@ -153,7 +153,8 @@ export const actionHandlers = [
|
||||
new GetGroupSystemMsg(),
|
||||
new DelEssenceMsg(),
|
||||
new SetEssenceMsg(),
|
||||
new GetRecentContact()
|
||||
new GetRecentContact(),
|
||||
new MarkAllMsgAsRead()
|
||||
];
|
||||
|
||||
function initActionMap() {
|
||||
|
||||
@@ -60,3 +60,12 @@ export class GoCQHTTPMarkMsgAsRead extends BaseAction<Payload, null> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export class MarkAllMsgAsRead extends BaseAction<Payload, null> {
|
||||
actionName = ActionName._MarkAllMsgAsRead;
|
||||
|
||||
protected async _handle(payload: Payload): Promise<null> {
|
||||
await NTQQMsgApi.markallMsgAsRead();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,5 +96,6 @@ export enum ActionName {
|
||||
SetLongNick = 'set_self_longnick',
|
||||
SetEssenceMsg = "set_essence_msg",
|
||||
DelEssenceMsg = "delete_essence_msg",
|
||||
GetRecentContact = "get_recent_contact"
|
||||
GetRecentContact = "get_recent_contact",
|
||||
_MarkAllMsgAsRead = "_mark_all_as_read"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user