replaceStickerInSetПоддерживается
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.
Особенности StaticGram
one atomic mutation (files.ReplaceStickerInSet)
Параметры
User identifier of the sticker set owner
Sticker set name
File identifier of the replaced 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.
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/replaceStickerInSet" \
-H "Content-Type: application/json" \
-d '{
"user_id": 123456789,
"name": "my_set_by_mybot",
"old_sticker": "value",
"sticker": "CAACAgIAAxkBAA..."
}'aiogram 3
from aiogram import Bot
from aiogram.client.session.aiohttp import AiohttpSession
from aiogram.client.telegram import TelegramAPIServer
session = AiohttpSession(api=TelegramAPIServer.from_base("https://api.staticgram.top"))
bot = Bot(TOKEN, session=session)
result = await bot.replace_sticker_in_set(
user_id=123456789,
name="my_set_by_mybot",
old_sticker="value",
sticker="CAACAgIAAxkBAA...",
)JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/replaceStickerInSet`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"user_id": 123456789,
"name": "my_set_by_mybot",
"old_sticker": "value",
"sticker": "CAACAgIAAxkBAA..."
}),
});
const data = await res.json();Ответ (True)
JSON
{
"ok": true,
"result": true
}