Skip to content

Commit

Permalink
fix(currency): type hinting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Sep 20, 2024
1 parent dd918ba commit eb084af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion canary/cogs/currency.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def format_symbol_currency(self, amount: Decimal) -> str:
return self.symbol + self.format_currency(amount)

@staticmethod
def check_bet(balance: Decimal, bet: Decimal) -> str | None:
def check_bet(balance: Decimal, bet: Decimal | None) -> str | None:
"""
Checks universally invalid betting cases.
"""
Expand All @@ -153,6 +153,8 @@ def check_bet(balance: Decimal, bet: Decimal) -> str | None:
if bet > balance:
return "You're too broke to bet that much!"

return None

async def get_last_claim_time(self, db: aiosqlite.Connection, author: discord.Member | discord.User) -> int | None:
claim_time_t = await self.fetch_one(
"SELECT IFNULL(MAX(Date), 0) FROM BankTransactions WHERE UserID = ? AND Action = ?",
Expand Down

0 comments on commit eb084af

Please sign in to comment.