koishi-plugin-xsxn-vue3 1.0.12 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -11,7 +11,6 @@ export interface CronTimeMessagesItem {
11
11
  export interface Config {
12
12
  url: string;
13
13
  notice: string;
14
- cronTimeMessages: CronTimeMessagesItem[];
15
14
  }
16
15
  export declare const Config: Schema<Config>;
17
16
  export declare function apply(ctx: Context, cfg: Config): Promise<void>;
package/lib/index.js CHANGED
@@ -39,27 +39,14 @@ module.exports = __toCommonJS(src_exports);
39
39
  var import_koishi = require("koishi");
40
40
  var name = "xsxn_vue3";
41
41
  var inject = {
42
- required: ["puppeteer", "cron"]
42
+ required: ["puppeteer"]
43
43
  };
44
44
  var Config = import_koishi.Schema.object({
45
45
  url: import_koishi.Schema.string().description("服务器地址").default(""),
46
- notice: import_koishi.Schema.string().description("公告文本").default(""),
47
- cronTimeMessages: import_koishi.Schema.array(import_koishi.Schema.object({
48
- cronTime: import_koishi.Schema.string().description("定时任务时间").default("0 0 * * *"),
49
- message: import_koishi.Schema.string().description("定时任务消息").default(""),
50
- groupID: import_koishi.Schema.string().description("定时任务群号").default("")
51
- })).description("定时任务配置").default([])
46
+ notice: import_koishi.Schema.string().description("公告文本").default("")
52
47
  });
53
48
  async function apply(ctx, cfg) {
54
49
  ctx.i18n.define("zh-CN", require_zh_CN());
55
- var bot = ctx.bots[0];
56
- if (cfg.cronTimeMessages && cfg.cronTimeMessages.length > 0) {
57
- for (const item of cfg.cronTimeMessages) {
58
- ctx.cron(item.cronTime, async () => {
59
- bot.sendMessage(item.groupID, item.message);
60
- });
61
- }
62
- }
63
50
  ctx.command("queryHelp").alias("关于").action((_) => {
64
51
  return `
65
52
  点击指令后输入需要查询的名称
@@ -139,7 +126,11 @@ async function apply(ctx, cfg) {
139
126
  await page.close();
140
127
  return `没有找到`;
141
128
  }
142
- const screenshot = await element.screenshot({ type: "png" });
129
+ const screenshot = await element.screenshot({
130
+ type: "jpeg",
131
+ encoding: "binary",
132
+ quality: 100
133
+ });
143
134
  await page.close();
144
135
  return import_koishi.h.image(screenshot, "image/png");
145
136
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-xsxn-vue3",
3
3
  "description": "查询工具与后端分离,无服务端,自用版本",
4
- "version": "1.0.12",
4
+ "version": "1.0.14",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
package/readme.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # koishi-plugin-xsxn-vue3
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/koishi-plugin-xsxn-vue3?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-xsxn-vue3)
4
- - ### 1.0.12
5
- - 添加定时消息功能
4
+ - ### 1.0.14
5
+ - 压缩截图质量
6
6
  - ### 1.0.11
7
7
  - 喜好指令修改为-卡池- 可搜索建筑,控制同伴搜索条件
8
8
  - ### 1.0.7