confirm_bot_connection()

Client.confirm_bot_connection()

Confirm a new bot connection (e.g., from a new device or location).

Called in response to an UpdateNewBotConnection update.

Usable by Users Bots
Parameters:

bot (int | str) – Unique identifier (int) or username (str) of the bot.

Returns:

bool – True on success.

Example

await app.confirm_bot_connection("@mybot")