Skip to content

Commit 75236dd

Browse files
committed
Bot response with username and chat id when access is denied
1 parent 1011057 commit 75236dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE): #
9191

9292
# Check if user is not allowed
9393
if is_user_or_chat_not_allowed(update.effective_user.username, update.effective_chat.id):
94-
await update.message.reply_text("You are not allowed to use this bot")
94+
await update.message.reply_text(
95+
f"You are not allowed to use this bot. "
96+
f"Your username is {update.effective_user.username} "
97+
f"and chat id is {update.effective_chat.id}"
98+
)
9599
return
96100

97101
# Handle Instagram stories

0 commit comments

Comments
 (0)