uploadStickerFile()
Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
user_id | number | required | User identifier of sticker file owner |
sticker | InputFile | required | A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files » |
sticker_format | "static" | "animated" | "video" | required | Format of the sticker, must be one of “static”, “animated”, “video” |
returns
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import { media } from "@yaebal/core";
import type { File, UploadStickerFileParams } from "@yaebal/types";
await bot.api.call<File>("uploadStickerFile", {
user_id: 123456789,
sticker: {} /* InputFile */,
sticker_format: "static",
} satisfies UploadStickerFileParams);context shortcut
also available as ctx.uploadStickerFile() on
16
context types — see @yaebal/contexts.
/** Use this method to upload a file with a sticker for later use in the [createNewStickerSet](https://core.telegram.org/bots/api/#createnewstickerset), [addStickerToSet](https://core.telegram.org/bots/api/#addstickertoset), or [replaceStickerInSet](https://core.telegram.org/bots/api/#replacestickerinset) methods (the file can be used multiple times). Returns the uploaded [File](https://core.telegram.org/bots/api/#file) on success. */
ctx.uploadStickerFile(params: Omit<UploadStickerFileParams, "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#uploadstickerfile