mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-02 00:30:25 +00:00
feat: Api SendGroupNotice
This commit is contained in:
17
src/onebot11/action/go-cqhttp/SendGroupNotice.ts
Normal file
17
src/onebot11/action/go-cqhttp/SendGroupNotice.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { WebApi } from '@/core/apis';
|
||||
interface Payload {
|
||||
group_id: string;
|
||||
content: string;
|
||||
image?: string;
|
||||
}
|
||||
export class SendGroupNotice extends BaseAction<Payload, null> {
|
||||
actionName = ActionName.GoCQHTTP_SendGroupNotice;
|
||||
|
||||
protected async _handle(payload: Payload) {
|
||||
await WebApi.setGroupNotice(payload.group_id, payload.content);
|
||||
//返回值验证没做
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user