Skip to content

Commit

Permalink
added print for vercel logging
Browse files Browse the repository at this point in the history
  • Loading branch information
brucewzj99 committed May 12, 2024
1 parent d76795f commit 8c7213d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions bot/error_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def __init__(self, error_class, message="An error occurred", extra_info=""):
self.extra_info = extra_info
self.error_class = error_class
logging.error(f"{error_class}: {message} {extra_info}")
print(f"{error_class}: {message} {extra_info}")
super().__init__(f"{self.error_class}: {self.message}")

class GoogleSheetError(BaseError):
Expand Down
9 changes: 5 additions & 4 deletions bot/telegram_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,15 +1080,16 @@ def notify_all(update, context):
def notify_preview(update, context):
query = update.callback_query
query.answer()
query.edit_message_text(
text=f"Sending message to all in progress...",
reply_markup=InlineKeyboardMarkup([]),
)

try:
if (
query.data == "confirm_send"
and str(update.effective_user.id) == MASTER_TELE_ID
):
query.edit_message_text(
text=f"Sending message to all in progress...",
reply_markup=InlineKeyboardMarkup([]),
)
new_feature_message = query.message.text.partition("\n")[2]
no_of_users, no_of_error_users, error_message = send_new_feature_message(
context, new_feature_message
Expand Down

0 comments on commit 8c7213d

Please sign in to comment.