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:
Argument
Description
Required
1
Sticker set name you want to set
Required
2
Chat id you want to set sticker set to
Optional. Current chat id by default
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
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