# Sticker Message Module

There are two ways to add extra sticker packs. Using a `plist` configuration file or programmatically. The following image formats are supported: `png`,`gif`.

#### Plist

Create a new `plist` file with the following format:

```
[
    {
        icon: "pack-icon.png",
        stickers: [
            "sticker1.png",
            "sticker2.png",
            ...
        ]
    }, ...
]
```

Then tell the app to use your `plist` file:

{% tabs %}
{% tab title="Java" %}

```java
ChatSDK.builder()
    ...
    .build()
    ...
    .addModule(StickerMessageModule.builder()
    .setLoadStickersFromPlist(R.raw.stickers_plist)
    .build())
    ...
```

{% endtab %}

{% tab title="Swift" %}

```swift
StickerMessageModule.shared().setCustomStickers(plist: "plist_name", bundle: Bundle.main)
```

{% endtab %}
{% endtabs %}

&#x20;The bundle should be where both `plist` file and the stickers are located.&#x20;

#### Programatically

Stickers can also be added programmatically.&#x20;

{% tabs %}
{% tab title="Java" %}

```java
StickerPack pack = new StickerPack(R.drawable.icon);
pack.addSticker(R.drawable.sticker_1, "sticker_1.png");
pack.addSticker(R.drawable.sticker_2, "sticker_2.png");

StickerMessageModule module = StickerMessageModule.builder()
    .setLoadStickersFromPlist(false)
    .build();

module.addPack(pack);

ChatSDK.builder()
    ...
    .build()
    ...
    .addModule(module)
    ...
```

{% endtab %}

{% tab title="Swift" %}

```swift
let sticker1 = Sticker(image: "image1.gif", sound: "sound.caf")
let sticker2 = Sticker(image: "image2.gif", sound: "sound.caf")

let pack = StickerPack(icon: "pack-icon.png", stickers: [
    sticker1,
    sticker2,
])

StickerMessageModule.shared().addPack(pack)
StickerMessageModule.shared().loadStickersFromPlist = false
```

{% endtab %}
{% endtabs %}


---

# 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://chat-sdk.gitbook.io/chat-sdk/modules/sticker-message-module.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.
