StaticGramBot API

setStickerMaskPositionПоддерживается

Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success.

Особенности StaticGram

stored in documentAttributeSticker JSON (MaskCoords); not yet projected to MTProto mask_coords

Параметры

stickerStringобязательный
File identifier of the sticker
mask_positionMaskPositionнеобязательный
A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.

Пример запроса

curl
curl "https://api.staticgram.top/bot$TOKEN/setStickerMaskPosition" \
  -H "Content-Type: application/json" \
  -d '{
    "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.set_sticker_mask_position(sticker="CAACAgIAAxkBAA...")
JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/setStickerMaskPosition`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "sticker": "CAACAgIAAxkBAA..."
  }),
});
const data = await res.json();

Ответ (True)

JSON
{
  "ok": true,
  "result": true
}

Описания методов и типов взяты из официальной документации Telegram Bot API (Bot API 10.3). Адрес API: https://api.staticgram.top