koishi-plugin-bilibili-notify 1.2.3-rc.10 → 1.2.3-rc.11
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/comRegister.js +9 -12
- package/package.json +1 -1
package/lib/comRegister.js
CHANGED
|
@@ -150,23 +150,20 @@ class ComRegister {
|
|
|
150
150
|
.action(async ({ session }) => {
|
|
151
151
|
// logger
|
|
152
152
|
this.logger.info('调用test gimg指令');
|
|
153
|
+
// 获取主播信息
|
|
153
154
|
const { data } = await ctx.biliAPI.getMasterInfo('194484313');
|
|
154
|
-
//
|
|
155
|
-
|
|
156
|
-
message.children.push(h('img', { src: data.info.face }))
|
|
157
|
-
message.children.push(h.text(`主播${data.info.uname}已下播`)) */
|
|
158
|
-
// <>{h('img', { src: data.info.face })} 主播{data.info.uname}已下播</>
|
|
159
|
-
await session.send((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, koishi_1.h)('img', { src: data.info.face }), " \u4E3B\u64AD", data.info.uname, "\u5DF2\u4E0B\u64AD"] }));
|
|
155
|
+
// 发送下播提示语
|
|
156
|
+
await session.send((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("img", { width: 50, height: 50, src: data.info.face, alt: "avatar" }), "\u4E3B\u64AD", data.info.uname, "\u5DF2\u4E0B\u64AD"] }));
|
|
160
157
|
});
|
|
161
|
-
|
|
158
|
+
testCom
|
|
162
159
|
.subcommand('.sendmsg', '测试发送消息方法')
|
|
163
160
|
.usage('测试发送消息方法')
|
|
164
161
|
.example('test sendmsg')
|
|
165
162
|
.action(async ({ session }) => {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
163
|
+
// 获得对应bot
|
|
164
|
+
const bot = this.getTheCorrespondingBotBasedOnTheSession(session);
|
|
165
|
+
// this.sendMsg(['all'], bot, 'Hello World')
|
|
166
|
+
});
|
|
170
167
|
const biliCom = ctx.command('bili', 'bili-notify插件相关指令', { permissions: ['authority:3'] });
|
|
171
168
|
biliCom.subcommand('.login', '登录B站之后才可以进行之后的操作')
|
|
172
169
|
.usage('使用二维码登录,登录B站之后才可以进行之后的操作')
|
|
@@ -980,7 +977,7 @@ class ComRegister {
|
|
|
980
977
|
let liveEndMsg = this.config.customLiveEnd
|
|
981
978
|
.replace('-name', uData.info.uname)
|
|
982
979
|
.replace('-time', await ctx.gimg.getTimeDifference(liveTime));
|
|
983
|
-
let msg = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0,
|
|
980
|
+
let msg = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("img", { width: 50, height: 50, src: uData.info.face, alt: "avatar" }), liveEndMsg] });
|
|
984
981
|
// 发送下播通知
|
|
985
982
|
await this.sendMsg(ctx, guildId, bot, msg);
|
|
986
983
|
}
|