koishi-plugin-xxck-1 0.3.1 → 0.3.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.js +2 -4
- package/package.json +1 -1
- package/readme.md +2 -0
package/lib/index.js
CHANGED
|
@@ -1443,7 +1443,7 @@ async function getOpenEventPool(ctx) {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
__name(getOpenEventPool, "getOpenEventPool");
|
|
1445
1445
|
async function _do_event_add(ctx, session, data, masterQQ) {
|
|
1446
|
-
const userQQ =
|
|
1446
|
+
const userQQ = await getUnifiedQQ(ctx, session);
|
|
1447
1447
|
if (userQQ !== masterQQ) {
|
|
1448
1448
|
return await session.send(build_msg(session, session.text("error.common.noPermission")));
|
|
1449
1449
|
}
|
|
@@ -1955,7 +1955,7 @@ async function apply(ctx, config) {
|
|
|
1955
1955
|
});
|
|
1956
1956
|
ctx.on("message", async (session) => {
|
|
1957
1957
|
const guildId = session.guildId;
|
|
1958
|
-
const userId =
|
|
1958
|
+
const userId = await getUnifiedQQ(ctx, session);
|
|
1959
1959
|
if (!guildId || !userId) return;
|
|
1960
1960
|
try {
|
|
1961
1961
|
const member = await session.bot.getGuildMember(guildId, userId);
|
|
@@ -2167,8 +2167,6 @@ async function apply(ctx, config) {
|
|
|
2167
2167
|
);
|
|
2168
2168
|
return;
|
|
2169
2169
|
}
|
|
2170
|
-
session.unifiedQQ = unifiedQQ;
|
|
2171
|
-
ctx.logger.info("[中间件] 已挂载 unifiedQQ: " + unifiedQQ);
|
|
2172
2170
|
const switchCmds = ["WWC开启", "WWC关闭", "WWC开启全部", "WWC关闭全部"];
|
|
2173
2171
|
if (switchCmds.some((cmd) => raw.startsWith(cmd))) return next();
|
|
2174
2172
|
const globalSwitch = await ctx.database.get("gacha_global_switch", { id: 1 });
|
package/package.json
CHANGED