koishi-plugin-bilibili-notify 1.2.8 → 1.2.9-alpha.0

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.
@@ -850,12 +850,14 @@ class ComRegister {
850
850
  const dUrl = this.config.dynamicUrl ? `${upName}发布了一条动态:https://t.bilibili.com/${dynamicId}` : '';
851
851
  // 如果pic存在,则直接返回pic
852
852
  if (pic) {
853
+ console.log('render mode');
853
854
  // pic存在,使用的是render模式
854
855
  await this.sendMsg(ctx, guildId, bot, pic + (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: dUrl }));
855
856
  }
856
857
  else {
858
+ console.log('page mode');
857
859
  // pic不存在,说明使用的是page模式
858
- await this.sendMsg(ctx, guildId, bot, (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [koishi_1.h.image(buffer, 'image/png'), " ", dUrl] }));
860
+ await this.sendMsg(ctx, guildId, bot, (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("img", { src: 'data:image/png;base64,' + buffer.toString('base64') }), " ", dUrl] }));
859
861
  }
860
862
  // 更新时间点为最新发布动态的发布时间
861
863
  switch (num) {
@@ -909,7 +911,7 @@ class ComRegister {
909
911
  return await this.sendMsg(ctx, guildId, bot, pic + msg);
910
912
  }
911
913
  // pic不存在,说明使用的是page模式
912
- await this.sendMsg(ctx, guildId, bot, (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [koishi_1.h.image(buffer, 'image/png'), " ", atAll && (0, jsx_runtime_1.jsx)("at", { type: "all" }), " ", liveStartMsg && liveStartMsg] }));
914
+ await this.sendMsg(ctx, guildId, bot, (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("img", { src: 'data:image/png;base64,' + buffer.toString('base64') }), " ", atAll && (0, jsx_runtime_1.jsx)("at", { type: "all" }), " ", liveStartMsg && liveStartMsg] }));
913
915
  };
914
916
  return async () => {
915
917
  try {
package/lib/database.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.apply = exports.name = void 0;
3
+ exports.name = void 0;
4
+ exports.apply = apply;
4
5
  exports.name = 'Database';
5
6
  function apply(ctx) {
6
7
  // 新增LoginBili表
@@ -22,4 +23,3 @@ function apply(ctx) {
22
23
  time: 'timestamp'
23
24
  }, { autoInc: true });
24
25
  }
25
- exports.apply = apply;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Context, Schema, Service } from "koishi";
3
2
  declare module 'koishi' {
4
3
  interface Context {
package/lib/index.js CHANGED
@@ -26,7 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.apply = exports.Config = exports.name = exports.inject = void 0;
29
+ exports.Config = exports.name = exports.inject = void 0;
30
+ exports.apply = apply;
30
31
  const koishi_1 = require("koishi");
31
32
  // import plugins
32
33
  // import Authority from './authority'
@@ -263,4 +264,3 @@ function apply(ctx, config) {
263
264
  }
264
265
  });
265
266
  }
266
- exports.apply = apply;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bilibili-notify",
3
3
  "description": "Koishi bilibili notify plugin",
4
- "version": "1.2.8",
4
+ "version": "1.2.9-alpha.0",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
@@ -24,11 +24,11 @@
24
24
  "bilibili"
25
25
  ],
26
26
  "peerDependencies": {
27
- "koishi": "^4.17.2"
27
+ "koishi": "^4.17.4"
28
28
  },
29
29
  "dependencies": {
30
- "axios": "^1.6.7",
31
- "axios-cookiejar-support": "^5.0.0",
30
+ "axios": "^1.6.8",
31
+ "axios-cookiejar-support": "^5.0.1",
32
32
  "jimp": "^0.22.12",
33
33
  "jsdom": "^24.0.0",
34
34
  "luxon": "^3.4.4",
@@ -41,7 +41,7 @@
41
41
  "@types/md5": "^2",
42
42
  "@types/qrcode": "^1",
43
43
  "@types/tough-cookie": "^4",
44
- "koishi-plugin-puppeteer": "^3.8.2"
44
+ "koishi-plugin-puppeteer": "^3.8.4"
45
45
  },
46
46
  "koishi": {
47
47
  "service": {
package/readme.md CHANGED
@@ -142,6 +142,7 @@
142
142
  - ver 1.2.6 现在可以随机生成UA,并更新了UA
143
143
  - ver 1.2.7 修复不论选择什么渲染模式都是render模式的bug,优化直播卡片推送逻辑
144
144
  - ver 1.2.8 修复例如像UP主籽岷使用webp格式的头像,下播通知无法发出的bug
145
+ - ver 1.2.9-alpha.0 bug测试版本,请跳过
145
146
 
146
147
  ## 交流群
147
148