mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 11:04:31 +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)
|
@listener(incoming=True, ignore_edited=True)
|
||||||
async def refresher(context):
|
async def refresher(context):
|
||||||
|
global last_init
|
||||||
if time.time() - last_init > 24 * 60 * 60:
|
if time.time() - last_init > 24 * 60 * 60:
|
||||||
# we'd better do this to prevent ruining the log file with massive fail logs
|
# we'd better do this to prevent ruining the log file with massive fail logs
|
||||||
# as this `refresher` would be called frequently
|
# as this `refresher` would be called frequently
|
||||||
global last_init
|
|
||||||
last_init = time.time()
|
last_init = time.time()
|
||||||
try:
|
try:
|
||||||
init()
|
init()
|
||||||
|
Loading…
Reference in New Issue
Block a user