mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
13 lines
305 B
TypeScript
13 lines
305 B
TypeScript
import { Handler } from '../index'
|
|
import { Dict } from 'cosmokit'
|
|
|
|
interface Payload {
|
|
channel_id: string
|
|
duration: number
|
|
}
|
|
|
|
export const muteChannel: Handler<Dict<never>, Payload> = async (ctx, payload) => {
|
|
await ctx.ntGroupApi.banGroup(payload.channel_id, payload.duration !== 0)
|
|
return {}
|
|
}
|