mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
18 lines
495 B
TypeScript
18 lines
495 B
TypeScript
import BaseAction from "../BaseAction";
|
|
import {ActionName} from "../types";
|
|
import {NTQQGroupApi} from "../../../ntqqapi/api/group";
|
|
|
|
interface Payload {
|
|
group_id: number,
|
|
group_name: string
|
|
}
|
|
|
|
export default class SetGroupName extends BaseAction<Payload, null> {
|
|
actionName = ActionName.SetGroupName
|
|
|
|
protected async _handle(payload: Payload): Promise<null> {
|
|
|
|
await NTQQGroupApi.setGroupName(payload.group_id.toString(), payload.group_name)
|
|
return null
|
|
}
|
|
} |