day/week options for Telegram '/profit' command
mypy fix
This commit is contained in:
parent
012309a06a
commit
14df243661
@ -424,7 +424,8 @@ class Telegram(RPCHandler):
|
|||||||
|
|
||||||
start_date = datetime.fromtimestamp(0)
|
start_date = datetime.fromtimestamp(0)
|
||||||
try:
|
try:
|
||||||
timescale = int(context.args[0]) if context.args else None
|
if context.args:
|
||||||
|
timescale = int(context.args[0])
|
||||||
today_start = datetime.combine(date.today(), datetime.min.time())
|
today_start = datetime.combine(date.today(), datetime.min.time())
|
||||||
start_date = today_start - timedelta(days=timescale)
|
start_date = today_start - timedelta(days=timescale)
|
||||||
except (TypeError, ValueError, IndexError):
|
except (TypeError, ValueError, IndexError):
|
||||||
|
Loading…
Reference in New Issue
Block a user