# Chat sticker set

## Set chat sticker set

To set chat sticker set, use **ChatStickerSet class-method** or `.setChatStickerSet` **answer/api method**

#### ChatStickerSet class-method or .setChatStickerSet answer method take arguments:

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

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

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

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

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

  @OnCommand('update_set')
  updateChatStickerSet() {
    return new ChatStickerSet('stickers_by_botname')
      .next('Chat sticker set updated!');
  }
}
```

{% endcode %}

## Delete chat sticker set

To delete chat sticker set, use **DeleteChatStickerSet class-method** or `.deleteChatStickerSet` **answer/api method**

{% hint style="info" %}
DeleteChatStickerSet class-method or .deleteChatStickerSet answer method takes argument: chat id you want to set sticker set to (optional, current chat id by default)

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

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

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

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

  @OnCommand('update_set')
  updateChatStickerSet() {
    return new DeleteChatStickerSet().next('Chat sticker set deleted!');
  }
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://degreetpro.gitbook.io/nestgram/api-reference/chat-sticker-set.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
