# Set chat action

To set chat action, use **ChatAction class-method**

{% hint style="info" %}
ChatAction class-method takes argument: action type you want to set (e.g. typing, upload\_photo, or [other](https://core.telegram.org/bots/api#sendchataction))
{% endhint %}

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

```typescript
import { Controller, OnCommand, ChatAction, GetAnswer, Answer } from 'nestgram';
import { AppService } from './app.service';

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

  @OnCommand('start')
  getChatAction(@GetAnswer() answer: Answer): ChatAction {
    setTimeout(() => answer.send('Hello, world!'), 2000);
    return new ChatAction('typing');
  }
}
```

{% endcode %}
