mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: delete_group_file
API
This commit is contained in:
parent
13299c4631
commit
08e7e471d6
@ -2,9 +2,9 @@ import { BaseAction, Schema } from '../BaseAction'
|
||||
import { ActionName } from '../types'
|
||||
|
||||
interface Payload {
|
||||
group_id: string | number
|
||||
group_id: number | string
|
||||
file_id: string
|
||||
busid: number
|
||||
busid: number | string
|
||||
}
|
||||
|
||||
export class DelGroupFile extends BaseAction<Payload, null> {
|
||||
@ -12,11 +12,11 @@ export class DelGroupFile extends BaseAction<Payload, null> {
|
||||
payloadSchema = Schema.object({
|
||||
group_id: Schema.union([Number, String]).required(),
|
||||
file_id: Schema.string().required(),
|
||||
busid: Schema.number().default(102)
|
||||
busid: Schema.union([Number, String]).default(102)
|
||||
})
|
||||
|
||||
async _handle(payload: Payload) {
|
||||
await this.ctx.ntGroupApi.deleteGroupFile(payload.group_id.toString(), [payload.file_id], [payload.busid])
|
||||
await this.ctx.ntGroupApi.deleteGroupFile(payload.group_id.toString(), [payload.file_id], [+payload.busid])
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user