Chat Settings

Administrators can change a chat’s details and behavior.

Changing the Title and Description

Use setChatTitle and setChatDescription to update a group, supergroup, or channel.

await client.setChatTitle(chatId, "MTKruto Community");
await client.setChatDescription(chatId, "A place to discuss MTKruto.");

Set the description to an empty string to remove it.

Changing the Photo

await client.setChatPhoto(chatId, "./community.jpg");

Use deleteChatPhoto to remove the current photo.

await client.deleteChatPhoto(chatId);

Enabling Slow ModeUSER-ONLY

User clients can use setSlowMode to limit how often members can send messages in a supergroup.

await client.setSlowMode(chatId, "30s");

See SlowModeDuration for the available durations. Use disableSlowMode to turn slow mode off.

Automatically Deleting MessagesUSER-ONLY

User clients can use setMessageTtl to automatically delete messages after a number of seconds.

await client.setMessageTtl(chatId, 7 * 24 * 60 * 60);