A 10 second interval for interest rates is not good
This commit is contained in:
parent
760b46979d
commit
8d50b702f3
1 changed files with 3 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue