UNPKG

@twiyin0/koishi-plugin-randomreply

Version:

Random reply your message

44 lines (43 loc) 2.36 kB
import { Context, Schema } from 'koishi'; export declare const name = "randomreply"; export declare const usage = "\n## \u4F7F\u7528\u8BF4\u660E\n<at#> @\u89E6\u53D1\u8005 \n<quote#> \u56DE\u590D/\u5F15\u7528\u89E6\u53D1\u8005\u7684\u6D88\u606F \n&lt;image url=\"xxxxx\"/&gt; \u53E5\u5C3E\u540E\u52A0\u4E00\u5F20\u56FE\u7247xxxx\u662F\u56FE\u7247\u7684\u5730\u5740 \n<recall#> \u64A4\u56DE\u6D88\u606F\uFF08\u9700\u8981\u7FA4\u804A\u7BA1\u7406\u5458\u6743\u9650\uFF09 \n\u793A\u4F8B: \n<at#>\u4F60\u597D\u554A&lt;image url=\"https://example.com/a.png\"/&gt; \nimage\u548Curl\u95F4\u5FC5\u987B\u6709\u7A7A\u683C \n\u522B\u7684\u597D\u50CF\u6CA1\u4EC0\u4E48\u597D\u8BF4\u7684 \nurl\u8BB0\u5F97\u52A0http(s)\uFF0C\u5982\u679C\u662F\u672C\u5730\u56FE\u7247\u8BF7\u7528file:///(\u7EDD\u5BF9\u8DEF\u5F84eg: file:///path/to/image.jpg) \n\u76EE\u524D\u4EC5\u652F\u6301\u4E00\u5F20\u56FE\u7247\uFF0C\u80FD\u529B\u6709\u9650\u5BF9\u4E0D\u4F4F\u5566 \n\u9879\u76EE\u53C2\u8003\uFF1A[@koishijs/respondent](https://github.com/koishijs/koishi-plugin-respondent)\n"; export interface Rule { express: boolean; match: string; reply: string[]; imgurl: string; } export declare const Rule: Schema<Schemastery.ObjectS<{ express: Schema<boolean, boolean>; match: Schema<string, string>; reply: Schema<string[], string[]>; }>, Schemastery.ObjectT<{ express: Schema<boolean, boolean>; match: Schema<string, string>; reply: Schema<string[], string[]>; }>>; export interface Config { rules: Rule[]; } export declare const schema: Schema<Schemastery.ObjectS<{ rules: Schema<Schemastery.ObjectS<{ express: Schema<boolean, boolean>; match: Schema<string, string>; reply: Schema<string[], string[]>; }>[], Schemastery.ObjectT<{ express: Schema<boolean, boolean>; match: Schema<string, string>; reply: Schema<string[], string[]>; }>[]>; }>, Schemastery.ObjectT<{ rules: Schema<Schemastery.ObjectS<{ express: Schema<boolean, boolean>; match: Schema<string, string>; reply: Schema<string[], string[]>; }>[], Schemastery.ObjectT<{ express: Schema<boolean, boolean>; match: Schema<string, string>; reply: Schema<string[], string[]>; }>[]>; }>>; export declare function apply(ctx: Context, cfg: Config): void;