get_welcome_messages()

async Client.get_welcome_messages()

Get the welcome messages a bot has stored for a chat.

A welcome message is an ephemeral message sent with welcome=True, kept by the server as a template and shown to each user the first time they open the chat, rather than delivered once.

Usable by Users Bots
Parameters:

chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

Returns:

List of Message – The stored welcome messages.

Example

for message in await app.get_welcome_messages(chat_id):
    print(message.text)