peyk.platforms.telegram.methods.replace_sticker_in_set

async peyk.platforms.telegram.methods.replace_sticker_in_set(self, user_id: int, name: str, old_sticker: str, sticker: InputSticker) bool

Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success.

Parameters:
  • user_id – User identifier of the sticker set owner

  • name – Sticker set name

  • old_sticker – File identifier of the replaced sticker

  • sticker – A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.

Returns:

Result returned by Telegram on successful execution.

Return type:

bool