Fixed condition causing error if not pack are available
This commit is contained in:
parent
81bd4d0d2b
commit
4260f78d95
|
|
@ -1,7 +1,7 @@
|
|||
TODO:
|
||||
|
||||
- [x] Schedule opening
|
||||
- [ ] Notification
|
||||
- [x] Notification
|
||||
- [ ] Complete API (for selling)
|
||||
- [ ] Add a scoring for cards pulled
|
||||
- [ ] Multiusers
|
||||
|
|
|
|||
|
|
@ -58,8 +58,9 @@ class App:
|
|||
datetime.now(tz=timezone.utc) - packs_last_regen_at
|
||||
)
|
||||
|
||||
if packs_remaining == 10 or next_pack_in < timedelta(seconds=20):
|
||||
if packs_remaining == 10 or (packs_remaining == 9 and next_pack_in < timedelta(seconds=20)):
|
||||
packs_remaining, packs_last_regen_at, cards = user.pull()
|
||||
logger.info("{} pulled {}", d.username, ", ".join([card.name for card in cards]))
|
||||
content = ""
|
||||
for card in cards:
|
||||
content += "- %s [%s](%s)\n" % (card.rarity.icon, card.name, card.url)
|
||||
|
|
|
|||
Loading…
Reference in New Issue