Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ezhil56x committed Mar 19, 2024
1 parent 51442b8 commit 5c45a52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
worksheet.append_row(['Date', 'Description', 'Amount'])

async def message_handler(update: Update, context: ContextTypes.DEFAULT_TYPE):
if update.effective_user.username != USERNAME and update.effective_user.id != USER_ID:
if update.effective_user.username != USERNAME and str(update.effective_user.id) != USER_ID:
username = update.effective_user.username
user_id = update.effective_user.id
first_name = update.effective_user.first_name
Expand All @@ -38,7 +38,7 @@ async def message_handler(update: Update, context: ContextTypes.DEFAULT_TYPE):
with open('logs.csv', 'a') as file:
file.write(f'{date},{time},{user_id},{username},{first_name},{last_name}\n')

if update.effective_user.username == USERNAME and update.effective_user.id == USER_ID:
if update.effective_user.username == USERNAME and str(update.effective_user.id) == USER_ID:
message = update.message.text

if message == 'ping':
Expand Down

0 comments on commit 5c45a52

Please sign in to comment.