mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
fix:panel coldtime
This commit is contained in:
parent
dddbd2e1cf
commit
4ccb1690a0
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ export class Panel extends ZZZPlugin {
|
||||||
const uid = await this.getUID();
|
const uid = await this.getUID();
|
||||||
if (!uid) return;
|
if (!uid) return;
|
||||||
const lastQueryTime = await redis.get(`ZZZ:PANEL:${uid}:LASTTIME`);
|
const lastQueryTime = await redis.get(`ZZZ:PANEL:${uid}:LASTTIME`);
|
||||||
const coldTime = settings.getConfig('gacha').interval || 300;
|
const coldTime = settings.getConfig('panel').interval || 300;
|
||||||
if (lastQueryTime && Date.now() - lastQueryTime < 1000 * coldTime) {
|
if (lastQueryTime && Date.now() - lastQueryTime < 1000 * coldTime) {
|
||||||
await this.reply(`${coldTime}秒内只能刷新一次,请稍后再试`);
|
await this.reply(`${coldTime}秒内只能刷新一次,请稍后再试`);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue