delete_direct_messages_chat_topic_history()¶
- Client.delete_direct_messages_chat_topic_history()¶
Delete messages in the topic in a channel direct messages chat administered by the current user.
Usable by Users Bots- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.topic_id (
int) – Identifier of the topic which messages will be fetched.max_id (
int, optional) – Maximum ID of message to delete.min_date (
datetime, optional) – Delete all messages newer than this time.max_date (
datetime, optional) – Delete all messages older than this time.
- Returns:
int– Amount of affected messages
Example
# Delete all messages in topic await app.delete_direct_messages_chat_topic_history(chat_id, topic_id)