A 10 second interval for interest rates is not good

This commit is contained in:
jesopo 2018-08-10 10:27:34 +01:00
parent 760b46979d
commit 8d50b702f3

View file

@ -5,6 +5,8 @@ SIDES = {"heads": 0, "tails": 1}
DEFAULT_REDEEM_DELAY = 600 # 600 seconds, 10 minutes
DEFAULT_REDEEM_AMOUNT = 100
DEFAULT_INTEREST_RATE = 0.01
INTEREST_INTERVAL = 60*60 # 1 hour
class Module(object):
def __init__(self, bot):
@ -27,7 +29,7 @@ class Module(object):
until_next_hour += ((60-(now.minute+1))*60)
bot.events.on("timer").on("coin-interest").hook(self.interest)
bot.add_timer("coin-interest", 10, persist=False,
bot.add_timer("coin-interest", INTEREST_INTERVAL, persist=False,
next_due=time.time()+until_next_hour)
def coins(self, event):