mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 05:09:15 +00:00
🐛 fix: rate.py variable scope
dafuq
This commit is contained in:
parent
0004a274c7
commit
cf36a42328
2
rate.py
2
rate.py
@ -41,10 +41,10 @@ last_init = time.time()
|
||||
|
||||
@listener(incoming=True, ignore_edited=True)
|
||||
async def refresher(context):
|
||||
global last_init
|
||||
if time.time() - last_init > 24 * 60 * 60:
|
||||
# we'd better do this to prevent ruining the log file with massive fail logs
|
||||
# as this `refresher` would be called frequently
|
||||
global last_init
|
||||
last_init = time.time()
|
||||
try:
|
||||
init()
|
||||
|
Loading…
Reference in New Issue
Block a user