koishi-plugin-bcjh-uidtransfer 0.0.2 → 0.0.3

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.
Files changed (2) hide show
  1. package/lib/index.js +8 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -114,9 +114,16 @@ function apply(ctx, config) {
114
114
  }
115
115
  }
116
116
  };
117
- ctx.command("UID", "查看个人标识符及积分信息").alias("uid").userFields(["id"]).action(async ({ session }) => {
117
+ ctx.command("UID", "查看个人标识符及积分信息等").alias("uid").userFields(["id"]).action(async ({ session }) => {
118
118
  return await transfer.getUserInfo(session);
119
119
  });
120
+ ctx.command("UID群标识", "查看当前群组ID").alias("uid群标识").action(async ({ session }) => {
121
+ const guildId = session.guildId;
122
+ if (!guildId) {
123
+ return "当前会话不在任何群组中,无法获取群组ID。";
124
+ }
125
+ return `当前群组ID: ${guildId}`;
126
+ });
120
127
  ctx.command("添加积分 <uid:number> <num:number>").action(async ({ session }, uid, num) => {
121
128
  if (!config.adminID.includes(session.userId)) {
122
129
  return `[×] 您不是管理员,无权操作该指令...`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bcjh-uidtransfer",
3
3
  "description": "bcjh自用",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [