get_message_author()

async Client.get_message_author()

Get the author of a message in a channel or supergroup.

Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target channel or supergroup.

  • message_id (int) – The message ID to get the author for.

Returns:

User – On success, the message author is returned.

Example

author = await app.get_message_author(chat_id, 123)