diff --git a/data/web/corefork.telegram.org/api/files.html b/data/web/corefork.telegram.org/api/files.html index 8455222b89..583f3557ca 100644 --- a/data/web/corefork.telegram.org/api/files.html +++ b/data/web/corefork.telegram.org/api/files.html @@ -390,7 +390,7 @@ It should be shown to the user in chat message previews, or while still download
The stripped bytes
payload should be inflated to a JPG payload as seen here ».
photoPathSize#d8214d41 type:string bytes:bytes = PhotoSize;
-Messages with animated, video, normal stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual sticker. +
Messages with animated, video, static stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual sticker.
Sticker outlines will have a j
type photoPathSize thumbnail.
This specific vector thumbnail consists of an SVG path, specially encoded to save space.
This path will be the outline of the animated sticker, and should be shown to the user while downloading the actual sticker.
Mask stickers can have associated coordinates, contained in the maskCoords constructor.
-inputMediaUploadedPhoto#1e287d04 flags:# file:InputFile stickers:flags.0?Vector<InputDocument> ttl_seconds:flags.1?int = InputMedia;
-
-inputMediaUploadedDocument#5b38c6c1 flags:# nosound_video:flags.3?true force_file:flags.4?true file:InputFile thumb:flags.2?InputFile mime_type:string attributes:Vector<DocumentAttribute> stickers:flags.0?Vector<InputDocument> ttl_seconds:flags.1?int = InputMedia;
-
-maskCoords#aed6dbb2 n:int x:double y:double zoom:double = MaskCoords;
-
-documentAttributeSticker#6319d612 flags:# mask:flags.1?true alt:string stickerset:InputStickerSet mask_coords:flags.0?MaskCoords = DocumentAttribute;
-
-
-documentAttributeHasStickers#9801d2f7 = DocumentAttribute;
-
-photo#fb197a65 flags:# has_stickers:flags.0?true id:long access_hash:long file_reference:bytes date:int sizes:Vector<PhotoSize> video_sizes:flags.1?Vector<VideoSize> dc_id:int = Photo;
-document#8fd4c4d8 flags:# id:long access_hash:long file_reference:bytes date:int mime_type:string size:long thumbs:flags.0?Vector<PhotoSize> video_thumbs:flags.1?Vector<VideoSize> dc_id:int attributes:Vector<DocumentAttribute> = Document;
-
-inputStickeredMediaPhoto#4a992157 id:InputPhoto = InputStickeredMedia;
-inputStickeredMediaDocument#438865b id:InputDocument = InputStickeredMedia;
-
-inputStickerSetItem#ffa0a496 flags:# document:InputDocument emoji:string mask_coords:flags.0?MaskCoords = InputStickerSetItem;
-
-stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered;
-stickerSetMultiCovered#3407e51b set:StickerSet covers:Vector<Document> = StickerSetCovered;
-
----functions---
-
-messages.sendMedia#e25ff8e0 flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;
-
-messages.getAttachedStickers#cc5b67cc media:InputStickeredMedia = Vector<StickerSetCovered>;
-
-messages.getMaskStickers#640f82b8 hash:long = messages.AllStickers;
+The n
position indicates where the mask should be placed:
The x
, y
and zoom
parameters further refine the position relative to the chosen facial feature.
Note that these coordinates are only used to provide a default position when attaching stickers to media, by locally running facial recognition software and placing the mask sticker at the appropriate coordinates relative to the chosen facial feature.
+The final sticker position can be modified by the user before generating a new photo/video with the sticker baked-in.
+The final coordinates will not be sent along with the attached media, as they are only used as a suggested default position when placing the sticker.
The default coordinates are chosen by the stickerset creator when uploading the sticker.
inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
@@ -375,7 +357,36 @@ The stickers_emoji_cache_time
specifies the validity period of the
An unused stickerset may also be automatically archived when installing new stickersets.
Archived stickers are not returned by messages.getAllStickers and can only be fetched using messages.getArchivedStickers: note that this method returns a set of stickerset previews ».
An updateStickerSets update will be emitted to the other logged-in sessions when archiving or unarchiving stickersets.
-This update should trigger a call to messages.getArchivedStickers.
+This update should trigger a call to messages.getArchivedStickers.
+Attached stickers
+inputMediaUploadedPhoto#1e287d04 flags:# file:InputFile stickers:flags.0?Vector<InputDocument> ttl_seconds:flags.1?int = InputMedia;
+
+inputMediaUploadedDocument#5b38c6c1 flags:# nosound_video:flags.3?true force_file:flags.4?true file:InputFile thumb:flags.2?InputFile mime_type:string attributes:Vector<DocumentAttribute> stickers:flags.0?Vector<InputDocument> ttl_seconds:flags.1?int = InputMedia;
+
+photo#fb197a65 flags:# has_stickers:flags.0?true id:long access_hash:long file_reference:bytes date:int sizes:Vector<PhotoSize> video_sizes:flags.1?Vector<VideoSize> dc_id:int = Photo;
+
+document#8fd4c4d8 flags:# id:long access_hash:long file_reference:bytes date:int mime_type:string size:long thumbs:flags.0?Vector<PhotoSize> video_thumbs:flags.1?Vector<VideoSize> dc_id:int attributes:Vector<DocumentAttribute> = Document;
+documentAttributeHasStickers#9801d2f7 = DocumentAttribute;
+
+inputStickeredMediaPhoto#4a992157 id:InputPhoto = InputStickeredMedia;
+inputStickeredMediaDocument#438865b id:InputDocument = InputStickeredMedia;
+
+inputStickerSetItem#ffa0a496 flags:# document:InputDocument emoji:string mask_coords:flags.0?MaskCoords = InputStickerSetItem;
+
+stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered;
+stickerSetMultiCovered#3407e51b set:StickerSet covers:Vector<Document> = StickerSetCovered;
+
+---functions---
+
+messages.sendMedia#e25ff8e0 flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;
+
+messages.getAttachedStickers#cc5b67cc media:InputStickeredMedia = Vector<StickerSetCovered>;
+Stickers of all kinds can be attached to photos and videos.
+First, overlay the sticker on top of the media file locally (properly handling eventual default mask coordinates), and upload the modified media file.
+Then, when sending the media file using messages.sendMedia, indicate the stickers that were overlaid in the stickers
field of inputMediaUploadedPhoto or inputMediaUploadedDocument.
+Sent stickered photos will have the has_stickers
flag set.
+Sent stickered video documents will have a documentAttributeHasStickers attribute.
+When receiving such a media file, clients should call messages.getAttachedStickers, passing the media: the method will return a set of stickerset previews », with info about the stickersets (not stickers) used in the media.
diff --git a/data/web/corefork.telegram.org/constructor/maskCoords.html b/data/web/corefork.telegram.org/constructor/maskCoords.html
index e9959b2251..762ba66ddd 100644
--- a/data/web/corefork.telegram.org/constructor/maskCoords.html
+++ b/data/web/corefork.telegram.org/constructor/maskCoords.html
@@ -4,10 +4,10 @@
maskCoords
-
+
-
+
@@ -42,7 +42,7 @@
maskCoords
- Position on a photo where a mask should be placed
+ Position on a photo where a mask should be placed when attaching stickers to media »
The n
position indicates where the mask should be placed:
+
+Related pages
+Stickers
+Telegram clients support displaying static and animated stickers.
diff --git a/data/web/corefork.telegram.org/stickers.html b/data/web/corefork.telegram.org/stickers.html
deleted file mode 100644
index cadc7c9806..0000000000
--- a/data/web/corefork.telegram.org/stickers.html
+++ /dev/null
@@ -1,267 +0,0 @@
-
-
-
-
- Telegram Stickers
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Telegram Stickers
-
- All users can create, send and share custom artwork using Telegram's open platform for stickers and emoji. Stickers take many forms – from basic images to stunning vector animations.
-To start building your own custom sets, click below:
-
-- Creating Stickers
-
-- Uploading Stickers
-
-
-Animated Stickers and Emoji
-Telegram stickers and emoji can move with smooth 60 FPS animations to bring your characters to life in high resolution.
-
-Animations require Telegram's unique .TGS format – click here for Video Stickers and Emoji made in .WEBM format.
-
-Creating Animations
-To create vector-animated stickers and emoji you will need the following:
-
-- Any vector graphics editor that allows exporting vector objects to Adobe After Effects to turn them into animations.
-- Adobe After Effects.
-- The Bodymovin-TG plugin, a fork of Bodymovin for Adobe After Effects that can be used to export animations to Telegram's .TGS format.
-
-
-The Lottie-based .TGS format allows for incredibly detailed animations that are less than 30 KB in size – six times smaller than the average photo.
-
-Animation Requirements
-
-- The canvas size must be 512х512 pixels.
-- Objects must not leave the canvas.
-- Animation length must not exceed 3 seconds.
-- All animations must be looped.
-- Final file size must not exceed 64 KB after rendering in Bodymovin.
-- All animations must run at 60 Frames Per Second.
-- You must not use the following Adobe After Effects functionality when animating your artwork: Auto-bezier keys, Expressions, Masks, Layer Effects, Images, Solids, Texts, 3D Layers, Merge Paths, Star Shapes, Gradient Strokes, Repeaters, Time Stretching, Time Remapping, Auto-Oriented Layers.
-
-Uploading Animations
-When your files are ready, send the /newanimated
command to the @Stickers bot – then send it the .TGS files.
-To upload emoji, send /newemojipack
to @Stickers. The requirements for .TGS stickers and emoji are exactly the same.
-Your set will need an icon. Icons for your sets must be 100x100 pixels, with a looped animation not exceeding 3 seconds.
-
-Video Stickers and Emoji
-Stickers and emoji can also be built with .WEBM – an open-source format that is compatible with many graphics editors to create high-detail images. Requires Telegram 8.5 or higher.
-
-
-Creating Videos
-To create stickers and emoji from video files, you only need editing software that lets you export your project as a .WEBM video file.
-Video Requirements
-
-See this Encoding .WEBM with VP9 Guide for details
-
-
-- For stickers, one side must be exactly 512 pixels in size – the other side can be 512 pixels or less.
-- For emoji, the video must be exactly 100x100 pixels in size
-- Video duration must not exceed 3 seconds.
-- Frame rate can be up to 30 FPS.
-- Video should be looped for optimal user experience.
-- Video size should not exceed 256 KB.
-- Video must be in .WEBM format encoded with the VP9 codec.
-- Video must have no audio stream.
-
-Uploading Videos
-Once your stickers are ready, send the /newvideo
command to the @Stickers bot – then send it the .WEBM files.
-To upload emoji, send /newemojipack
to @Stickers. Note that video emoji need to be a smaller resolution than stickers.
-Your set will need a .WEBM icon. Icons for video sticker sets must be 100x100 pixels, with a looped animation not exceeding 3 seconds.
-
-Static Stickers and Emoji
-Turn your favorite drawings and memes into packs of images that are easily to share and access on any device.
-Creating Images
-To create static stickers and emoji for Telegram, you only need an image editor that lets you export in .PNG or .WEBP format.
-Image Requirements
-
-- For stickers, one side must be exactly 512 pixels in size – the other side can be 512 pixels or less.
-- For emoji, images must be exactly 100x100 pixels in size.
-- The image file must be in either .PNG or .WEBP format.
-
-
-Tip: a transparent background, white stroke and black shadow effect will make your sticker stand out.
-
-Uploading Images
-Once your stickers are ready, start a chat with the @Stickers bot and send the command /newpack
. Your sticker set can also have a custom icon – a 100x100 pixel image in .PNG or .WEBP format.
-To upload emoji, send /newemojipack
to @Stickers. Note that static emoji need to be a smaller resolution than stickers.
-
-
-
-Custom Emoji
-As of version 8.9 released in August 2022, Telegram apps support custom emoji.
Emoji use the same technology as stickers, making it very easy to convert your art to both formats. Check out the video and image sections for details on the different size requirements.
To upload them, use the /newemojipack
command in @Stickers.
-
-Everyone can create new custom emoji, however, adding and using custom sets is currently an exclusive feature of Telegram Premium users.
-
-
-Using the @Stickers Bot
-Publishing and editing sticker packs is simple and automated, thanks to the @Stickers bot. It can also show you detailed stats for stickers and packs.
-Publishing a Sticker Pack
-Once you open the bot, press the Start button or send /start
. The bot will reply, describing its different commands. It will walk you through step by step, but here's a quick guide:
-
-- Open the bot menu in the message bar and select the
/newpack
command to start uploading static stickers. For animated stickers use /newanimated
, or /newvideo
for video stickers.
-- Give your sticker pack a name – this name will appear as the title for your pack in the sticker panel.
-- Send your first sticker file – an image file, .TGS file, or .WEBM file. Using one of the Desktop or Web apps is strongly recommended.
-- Choose an emoji that corresponds to your sticker – this lets users quickly find it with sticker suggestions.
-- Continue uploading all your sticker files.
-- When you're done uploading, send the
/publish
command.
-- Set an icon for your pack – static sticker packs can
/skip
this step, but it is required for animated or video stickers.
-- Choose a short name for your sticker pack – it will be used to create a shareable link for the pack like t.me/addstickers/HotCherry. Congratulations! Your stickers are ready for the world.
-
-
-After your pack is finished, you can send /start
again to see the full list of commands, or use the bot menu to create another pack, edit an existing pack, or see statistics.
-
-Editing a Sticker Pack
-Once you've created one or more packs, you can add, edit or replace stickers in your existing sets.
-
-- Use
/addsticker
if you have more artwork you'd like to add to a set. Choose one of your packs from the list – the upload process is exactly the same as before.
-- Use
/editsticker
to change the emoji you assigned to a sticker – select the pack and sticker, or simply send the intended sticker from your panel.
-- Use
/replacesticker
if you want to swap out an older sticker for an updated version.
-- Use
/ordersticker
to change the order of stickers in your pack. Choose the pack and one of the stickers, then choose another sticker to appear before it (to the left) in the panel.
-- Use
/delsticker
to remove a sticker from the pack – you can always use /addsticker
to add it again if you change your mind.
-- Use
/seticon
to set an icon for your pack or to change the icon. Static sticker packs without a custom icon will use the first sticker as its icon.
-
-
-Edits to your sticker packs may take up to an hour to update for all users.
-
-Sticker Stats
-There are a number of commands that let you see statistics for your stickers – here's what they all do:
-
-/packstats
shows how many times your pack was used, installed and removed – both recently and overall.
-/stats
shows how many times an individual sticker has been sent.
-/top
shows the most popular stickers from all your packs.
-/packtop
shows your most popular sticker packs and their individual stats.
-/topbypack
shows the top stickers from a specific sticker pack.
-/packusagetop
shows your most popular packs by recent usage.
-
-
-You can filter the results of /top
, /packtop
, /topbypack
and /packusagetop
. For example /top 20
would show your top 20 stickers, and /topbypack -5
would show the 5 least popular stickers from a pack.
-
-Importing Stickers From Other Apps
-Developers can build apps to automate importing stickers using Telegram’s API. With these tools, users can instantly bring their favorite stickers to Telegram.
-For Developers
-As of version 7.8, Telegram apps support a simple API for importing stickers. Developers can use this to build apps or add tools to apps that let users instantly transfer stickers to Telegram – or create custom stickers from photos or videos.
-
-Click here for more information about developing apps for importing stickers.
-
-For Users
-Users can find apps that allow them to import stickers or quickly generate their own. They can also easily publish custom stickers with the @Stickers bot using .PNG, .WEBP or .WEBM files for stickers from other apps.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/data/web/corefork.telegram.org/type/MaskCoords.html b/data/web/corefork.telegram.org/type/MaskCoords.html
index 0ce779c96d..40ff2cc9c7 100644
--- a/data/web/corefork.telegram.org/type/MaskCoords.html
+++ b/data/web/corefork.telegram.org/type/MaskCoords.html
@@ -67,7 +67,7 @@
-
maskCoords
-Position on a photo where a mask should be placed
The n
position indicates where the mask should be placed:
- 0 => Relative to the forehead
- 1 => Relative to the eyes
- 2 => Relative to the mouth
- 3 => Relative to the chin
+Position on a photo where a mask should be placed when attaching stickers to media »
The n
position indicates where the mask should be placed:
- 0 => Relative to the forehead
- 1 => Relative to the eyes
- 2 => Relative to the mouth
- 3 => Relative to the chin