Skip to content

Commit 749f7bd

Browse files
committed
added short text to retrieve today transaction
1 parent c8d6fda commit 749f7bd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

bot/telegram_bot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,8 @@ def handle_get_transaction(update, context):
690690
reply = update.message.text
691691
msg = ""
692692
try:
693+
if reply.lower() == "tdy":
694+
reply = dt.datetime.now(timezone).strftime("%d %b")
693695
if check_date_format(reply):
694696
day, month = reply.split(" ")
695697
total_spend, transport_values, other_values = gs.get_day_transaction(

bot/text_str.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
+ "\nTo report bugs, please create a issue at https://github.com/brucewzj99/tele-tracker-v2/issues or contact me @bruceeew on Telegram"
5959
)
6060

61-
GET_TRANSACTION_TEXT = "Please specify the date and month you wish to retrieve from in this format: DD MMM\ne.g 16 Mar\nor use /cancel to exit"
61+
GET_TRANSACTION_TEXT = "Please specify the date and month you wish to retrieve from in this format: DD MMM\ne.g 16 Mar\n\nUse 'tdy' to retrieve the transacation for today \nor use /cancel to exit"
6262
GET_OVERALL_TEXT = "Please specify the month you wish to retrieve your overall transaction in this format: MMM\ne.g Mar\nor use /cancel to exit"
6363

6464
ADD_INCOME_TEXT = "Add income\nPlease state your income followed by any remarks (optional): [income],[remarks]\ne.g. 2000, Something"

0 commit comments

Comments
 (0)