add_card quantity must always be at least 1

This commit is contained in:
Ben 2020-04-07 23:41:12 +01:00
parent 4794358b5b
commit 0b00a778d6

View File

@ -194,6 +194,7 @@ class Penguin(Spheniscidae, penguin.Penguin):
return True return True
async def add_card(self, card, quantity=0, member_quantity=0): async def add_card(self, card, quantity=0, member_quantity=0):
quantity = max(1, quantity + member_quantity)
if card.id in self.cards: if card.id in self.cards:
penguin_card = self.cards[card.id] penguin_card = self.cards[card.id]