mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-17 05:37:46 +00:00
feat:拦截国际服
This commit is contained in:
parent
7ffe3e6451
commit
1dd7fe9fb5
2 changed files with 9 additions and 9 deletions
|
|
@ -157,9 +157,7 @@ export class GachaLog extends ZZZPlugin {
|
||||||
}
|
}
|
||||||
async getLog(key) {
|
async getLog(key) {
|
||||||
const uid = await this.getUID();
|
const uid = await this.getUID();
|
||||||
if (!uid) {
|
if (!uid) return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
this.reply('抽卡记录获取中请稍等...可能需要一段时间,请耐心等待');
|
this.reply('抽卡记录获取中请稍等...可能需要一段时间,请耐心等待');
|
||||||
const { data, count } = await updateGachaLog(key, uid);
|
const { data, count } = await updateGachaLog(key, uid);
|
||||||
let msg = [];
|
let msg = [];
|
||||||
|
|
@ -225,9 +223,7 @@ export class GachaLog extends ZZZPlugin {
|
||||||
await this.reply('抽卡记录相应功能只支持国服');
|
await this.reply('抽卡记录相应功能只支持国服');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!uid) {
|
if (!uid) return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
await this.getPlayerInfo();
|
await this.getPlayerInfo();
|
||||||
await this.reply('正在分析抽卡记录,请稍等', false, {
|
await this.reply('正在分析抽卡记录,请稍等', false, {
|
||||||
at: true,
|
at: true,
|
||||||
|
|
@ -256,13 +252,11 @@ export class GachaLog extends ZZZPlugin {
|
||||||
await this.reply('抽卡记录相应功能只支持国服');
|
await this.reply('抽卡记录相应功能只支持国服');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!uid) return false;
|
||||||
if (!this.e.isPrivate || this.e.isGroup) {
|
if (!this.e.isPrivate || this.e.isGroup) {
|
||||||
await this.reply('请私聊获取抽卡链接', false, { at: true });
|
await this.reply('请私聊获取抽卡链接', false, { at: true });
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!uid) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const key = await getAuthKey(this.e, this.User, uid);
|
const key = await getAuthKey(this.e, this.User, uid);
|
||||||
if (!key) {
|
if (!key) {
|
||||||
await this.reply('authKey获取失败,请检查cookie是否过期');
|
await this.reply('authKey获取失败,请检查cookie是否过期');
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,10 @@ export class Panel extends ZZZPlugin {
|
||||||
}
|
}
|
||||||
async bindDevice() {
|
async bindDevice() {
|
||||||
const uid = await this.getUID();
|
const uid = await this.getUID();
|
||||||
|
if (/^(1[0-9])[0-9]{8}/i.test(uid)) {
|
||||||
|
await this.reply('国际服不需要绑定设备');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//先throw一步(
|
//先throw一步(
|
||||||
this.setContext('toBindDevice');
|
this.setContext('toBindDevice');
|
||||||
await this.reply(
|
await this.reply(
|
||||||
|
|
@ -97,6 +101,8 @@ export class Panel extends ZZZPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async deleteBind() {
|
async deleteBind() {
|
||||||
|
const uid = await this.getUID();
|
||||||
|
if (/^(1[0-9])[0-9]{8}/i.test(uid)) return false;
|
||||||
const ltuid = await this.getLtuid();
|
const ltuid = await this.getLtuid();
|
||||||
await redis.del(`ZZZ:DEVICE_FP:${ltuid}:FP`);
|
await redis.del(`ZZZ:DEVICE_FP:${ltuid}:FP`);
|
||||||
await redis.del(`ZZZ:DEVICE_FP:${ltuid}:BIND`);
|
await redis.del(`ZZZ:DEVICE_FP:${ltuid}:BIND`);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue