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.
- package/lib/index.js +8 -1
- 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", "
|
|
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 `[×] 您不是管理员,无权操作该指令...`;
|