mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
card basic
This commit is contained in:
parent
51fb65cdb4
commit
cd0793655d
32 changed files with 807 additions and 260 deletions
|
|
@ -71,6 +71,12 @@ export class GachaLog extends ZZZPlugin {
|
|||
this.getLog(key);
|
||||
}
|
||||
async getLog(key) {
|
||||
const lastQueryTime = await redis.get(`ZZZ:GACHA:${uid}:LASTTIME`);
|
||||
if (lastQueryTime && Date.now() - lastQueryTime < 1000 * 60 * 5) {
|
||||
await this.reply('1分钟内只能刷新一次,请稍后重试');
|
||||
return false;
|
||||
}
|
||||
await redis.set(`ZZZ:GACHA:${uid}:LASTTIME`, Date.now());
|
||||
const uid = await this.getUID();
|
||||
const data = await updateGachaLog(key, uid);
|
||||
let msg = `抽卡记录更新成功,共${Object.keys(data).length}个卡池`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue