Chat sticker set

You can set chat sticker set or delete it

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:

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

app.controller.ts
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!');
  }
}

Delete chat sticker set

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

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

app.controller.ts
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!');
  }
}

Last updated