@shangxueink/koishi-plugin-qq-markdown-button
Version:
[<ruby>**QQ机器人按钮菜单**<rp>(</rp><rt>点我查看使用说明</rt><rp>)</rp></ruby>](https://www.npmjs.com/package/@shangxueink/koishi-plugin-qq-markdown-button) 自用小插件咪~ 使用json文件设置你的机器人菜单这样就不需要一堆配置项还很烧脑了。自用插件哦~
39 lines (38 loc) • 1.05 kB
TypeScript
import { Session } from 'koishi';
export type MenuType = 'json' | 'markdown' | 'raw';
export interface Config {
command_name: string;
file_name_v2: string[];
send_sequence: string[];
Allow_INTERACTION_CREATE: boolean;
consoleinfo: boolean;
}
export interface QQMessageApi {
sendMessage(channelId: string, content: unknown): Promise<unknown>;
sendPrivateMessage(userId: string, content: unknown): Promise<unknown>;
acknowledgeInteraction(interactionId: string, data: {
code: number;
}): Promise<unknown>;
}
export interface QQGuildMessageApi {
sendMessage(channelId: string, content: unknown): Promise<unknown>;
}
export interface SendSequenceOptions {
baseDir: string;
session: Session;
config: Config;
args: string[];
interactionId: string;
}
export interface TemplateCandidate {
type: MenuType;
name: string;
value: string;
label: string;
}
declare module 'koishi' {
interface Session {
qq?: QQMessageApi;
qqguild?: QQGuildMessageApi;
}
}