koishi-plugin-bcjh-uidtransfer 0.0.1 → 0.0.2

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
@@ -2,9 +2,9 @@ import { Context, Schema } from 'koishi';
2
2
  export declare const name = "bcjh-uidtransfer";
3
3
  export declare const inject: string[];
4
4
  export interface Config {
5
- adminQQ: string[];
5
+ adminID: string[];
6
6
  monetaryName: string;
7
- botId: string;
7
+ botID: string;
8
8
  showPic: boolean;
9
9
  }
10
10
  export declare const Config: Schema<Config>;
package/lib/index.js CHANGED
@@ -30,9 +30,9 @@ var import_koishi = require("koishi");
30
30
  var name = "bcjh-uidtransfer";
31
31
  var inject = ["database", "monetary"];
32
32
  var Config = import_koishi.Schema.object({
33
- adminQQ: import_koishi.Schema.array(String).role("table").description("管理员QQ 可执行添加积分操作"),
33
+ adminID: import_koishi.Schema.array(String).role("table").description("管理员ID列表"),
34
34
  monetaryName: import_koishi.Schema.string().default("货币").description("积分的名字"),
35
- botId: import_koishi.Schema.string().default("").description("QQ官方机器人的 id (实现头像获取)"),
35
+ botID: import_koishi.Schema.string().default("").description("QQ官方机器人的 id (实现头像获取)"),
36
36
  showPic: import_koishi.Schema.boolean().default(true).description("是否显示用户头像 (需绑定QQbotId)")
37
37
  });
38
38
  function apply(ctx, config) {
@@ -50,7 +50,7 @@ function apply(ctx, config) {
50
50
  } else {
51
51
  monetary = data.value;
52
52
  }
53
- const isAdmin = config.adminQQ.includes(session.userId);
53
+ const isAdmin = config.adminID.includes(session.userId);
54
54
  const successMsg = isAdmin ? "获取管理员信息成功!" : "获取用户信息成功!";
55
55
  const text = `${successMsg}
56
56
  [uid] ${uid}
@@ -61,7 +61,7 @@ function apply(ctx, config) {
61
61
  [持有${config.monetaryName}] ${monetary}`;
62
62
  let message = "";
63
63
  if (config.showPic) {
64
- message += import_koishi.h.image(`http://q.qlogo.cn/qqapp/${config.botId}/${userId}/640`);
64
+ message += import_koishi.h.image(`http://q.qlogo.cn/qqapp/${config.botID}/${userId}/640`);
65
65
  }
66
66
  message += text;
67
67
  return message;
@@ -102,7 +102,7 @@ function apply(ctx, config) {
102
102
  const monetary = data.value;
103
103
  let msg = "";
104
104
  if (config.showPic && bindData) {
105
- msg += import_koishi.h.image(`http://q.qlogo.cn/qqapp/${config.botId}/${bindData.pid}/640`);
105
+ msg += import_koishi.h.image(`http://q.qlogo.cn/qqapp/${config.botID}/${bindData.pid}/640`);
106
106
  }
107
107
  msg += `[?] 确认目标信息为:
108
108
  [uid] ${data.uid}
@@ -118,7 +118,7 @@ function apply(ctx, config) {
118
118
  return await transfer.getUserInfo(session);
119
119
  });
120
120
  ctx.command("添加积分 <uid:number> <num:number>").action(async ({ session }, uid, num) => {
121
- if (!config.adminQQ.includes(session.userId)) {
121
+ if (!config.adminID.includes(session.userId)) {
122
122
  return `[×] 您不是管理员,无权操作该指令...`;
123
123
  }
124
124
  if (!uid || !num) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bcjh-uidtransfer",
3
- "description": "自用bcjh-uidtransfer",
4
- "version": "0.0.1",
3
+ "description": "bcjh自用",
4
+ "version": "0.0.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
package/readme.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/koishi-plugin-bcjh-uidtransfer?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-bcjh-uidtransfer)
4
4
 
5
- 自用bcjh-uidtransfer
5
+ bcjh自用