> For the complete documentation index, see [llms.txt](https://degreetpro.gitbook.io/nestgram/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://degreetpro.gitbook.io/nestgram/api-reference/update-chat-info-photo-title-description-and-more.md).

# Update chat info, photo, title, description and more

## Set/delete chat photo

{% hint style="info" %}
If you want to know what arguments an API method takes, see the IDE hint
{% endhint %}

### Set chat photo

You can set chat photo using **ChatPhoto class-method** or `.setChatPhoto` **answer/api method**

#### ChatPhoto class-method or .setChatPhoto answer method take arguments:

<table><thead><tr><th width="153" data-type="number">Argument</th><th width="350.3333333333333">Description</th><th>Required</th></tr></thead><tbody><tr><td>1</td><td>Photo you want to set (<a href="/pages/bZoucGYlfiIJtuPqZqjU#send-photo">Photo class</a>)</td><td><strong>Required</strong></td></tr><tr><td>2</td><td>Chat id in which you want to set photo</td><td>Optional. Current chat id by default</td></tr></tbody></table>

### Delete chat photo

To delete chat photo, use **DeleteChatPhoto class-method** or `.deleteChatPhoto` **answer/api method**

{% hint style="info" %}
DeleteChatPhoto class-method or .deleteChatPhoto answer method takes argument: chat id you want to delete photo to (*optional, current chat id by default*)
{% endhint %}

## Set chat title/description

{% hint style="info" %}
If you want to know what arguments an API method takes, see the IDE hint
{% endhint %}

### Set chat title

You can set chat title using **ChatTitle class-method** or `.setChatTitle` **answer/api method**

#### **ChatTitle class-method or .setChatTitle answer method take arguments:**

<table><thead><tr><th width="163.8396361895644" data-type="number">Argument</th><th width="296.3333333333333">Description</th><th>Required</th></tr></thead><tbody><tr><td>1</td><td>Title you want to set</td><td><strong>Required</strong></td></tr><tr><td>2</td><td>Chat id you want to set title for</td><td>Optional. Current chat id by default</td></tr></tbody></table>

To set chat description, use **ChatDescription class-method** or `.setChatDescription` **answer/api method**

### Set chat description

#### **ChatDescription class-method or .setChatDescription answer method take arguments:**

<table><thead><tr><th width="150" data-type="number">Argument</th><th width="296.3333333333333">Description</th><th>Required</th></tr></thead><tbody><tr><td>1</td><td>Description you want to set</td><td><strong>Required</strong></td></tr><tr><td>2</td><td>Chat id you want to set description for</td><td>Optional. Current chat id by default</td></tr></tbody></table>

## Example

{% code title="app.controller.ts" %}

```typescript
import { ChatDescription, ChatPhoto, ChatTitle, Controller, OnCommand, Photo } from 'nestgram';
import { AppService } from './app.service';
import * as path from 'path';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @OnCommand('update_me')
  updateChat() {
    return new ChatPhoto(new Photo('path', path.resolve(__dirname, 'img.png')))
      .next(new ChatTitle('Test chat'))
      .next(new ChatDescription('Test description'))
      .next('Chat info updated!');
  }
}
```

{% endcode %}
