# Set chat permissions

To set chat permissions, you can use **ChatPermissions class-method** or `.setChatPermissions` **answer/api method**

{% hint style="info" %}
ChatPermissions class-method or .setChatPermissions takes argument: [permissions](https://core.telegram.org/bots/api#chatpermissions) you want to set

If you want to know what arguments an API method takes, see the IDE hint

`NestgramDefault.chatPermissions` is chat permissions by default
{% endhint %}

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

```typescript
import { Controller, OnCommand, ChatPermissions, NestgramDefault } from 'nestgram';
import { AppService } from './app.service';

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

  @OnCommand('admin_chat_permissions')
  updateChatPermissions(): ChatPermissions {
    return new ChatPermissions({
      ...NestgramDefault.chatPermissions,
      can_send_polls: false,
      can_invite_users: false,
    }).next('Chat permissions updated!');
  }
}
```

{% endcode %}
