diff --git a/data/corefork.telegram.org/api/animated-emojis.html b/data/corefork.telegram.org/api/animated-emojis.html index fc2d399bc6..c88b975e4c 100644 --- a/data/corefork.telegram.org/api/animated-emojis.html +++ b/data/corefork.telegram.org/api/animated-emojis.html @@ -91,6 +91,7 @@ For supported emojis, clients on both sides of pr messages.getStickerSet#c8a0ec74 stickerset:InputStickerSet hash:int = messages.StickerSet; messages.setTyping#58943ee2 flags:# peer:InputPeer top_msg_id:flags.0?int action:SendMessageAction = Bool; +

Not to be confused with message reactions Β».

On startup, clients should fetch the animated reaction emoji stickerset by calling the messages.getStickerSet method, providing inputStickerSetAnimatedEmojiAnimations to the stickerset field.
The returned stickerset will contain a set of animated emoji reactions, one or more for each of the supported emojis.
If a set of reactions for the ❀ emoji is returned, the same reactions should also be assigned to the 🧑, πŸ’›, πŸ’š, πŸ’™, πŸ’œ, πŸ–€, 🀍 and 🀎 emojis.

diff --git a/data/corefork.telegram.org/api/files.html b/data/corefork.telegram.org/api/files.html index a0f0287c1d..e252cdc4e5 100644 --- a/data/corefork.telegram.org/api/files.html +++ b/data/corefork.telegram.org/api/files.html @@ -387,9 +387,9 @@ 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 Β».

Vector thumbnails

photoPathSize#d8214d41 type:string bytes:bytes = PhotoSize;
-

Messages with animated stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual lottie animation. -Animated sticker outlines will have a j type photoPathSize thumbnail.

-

This specific vector thumbnail consists in an SVG path, specially encoded to save space.
+

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. +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.

As for stripped sizes, the payload should be inflated using the following algorithm:

encoded := photoPathSize.bytes
diff --git a/data/corefork.telegram.org/api/reactions.html b/data/corefork.telegram.org/api/reactions.html
new file mode 100644
index 0000000000..54402ad9ab
--- /dev/null
+++ b/data/corefork.telegram.org/api/reactions.html
@@ -0,0 +1,153 @@
+
+
+  
+    
+    Message reactions
+    
+    
+    
+    
+    
+    
+
+    
+    
+    
+    
+  
+  
+    
+ +
+
+
+ +

Message reactions

+ +
+ +

Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.

+

Schema:

+
message#38116ee0 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true id:int from_id:flags.8?Peer peer_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int = Message;
+
+updateMessageReactions#154798c3 peer:Peer msg_id:int reactions:MessageReactions = Update;
+
+reactionCount#6fb250d1 flags:# chosen:flags.0?true reaction:string count:int = ReactionCount;
+
+messageReactions#4f2b9479 flags:# min:flags.0?true can_see_list:flags.2?true results:Vector<ReactionCount> recent_reactions:flags.1?Vector<MessagePeerReaction> = MessageReactions;
+messages.messageReactionsList#31bd492d flags:# count:int reactions:Vector<MessagePeerReaction> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = messages.MessageReactionsList;
+messagePeerReaction#51b67eff flags:# big:flags.0?true unread:flags.1?true peer_id:Peer reaction:string = MessagePeerReaction;
+
+availableReaction#c077ec01 flags:# inactive:flags.0?true reaction:string title:string static_icon:Document appear_animation:Document select_animation:Document activate_animation:Document effect_animation:Document around_animation:flags.1?Document center_icon:flags.1?Document = AvailableReaction;
+
+messages.availableReactionsNotModified#9f071957 = messages.AvailableReactions;
+messages.availableReactions#768e3aad hash:int reactions:Vector<AvailableReaction> = messages.AvailableReactions;
+messageEntitySpoiler#32ca960f offset:int length:int = MessageEntity;
+
+channelAdminLogEventActionChangeAvailableReactions#9cf7f76a prev_value:Vector<string> new_value:Vector<string> = ChannelAdminLogEventAction;
+
+---functions---
+
+messages.sendReaction#25690ce4 flags:# big:flags.1?true peer:InputPeer msg_id:int reaction:flags.0?string = Updates;
+messages.getMessagesReactions#8bba90e6 peer:InputPeer id:Vector<int> = Updates;
+messages.getMessageReactionsList#e0ee6b77 flags:# peer:InputPeer id:int reaction:flags.0?string offset:flags.1?string limit:int = messages.MessageReactionsList;
+
+messages.getUnreadReactions#e85bae1a peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
+messages.readReactions#82e251d7 peer:InputPeer = messages.AffectedHistory;
+
+messages.setChatAvailableReactions#14050ea6 peer:InputPeer available_reactions:Vector<string> = Updates;
+messages.getAvailableReactions#18dea0ac hash:int = messages.AvailableReactions;
+messages.setDefaultReaction#d960c4d4 reaction:string = Bool;
+

Users can react to a message using messages.sendReaction: the big flag can be optionally set to elicit a bigger reaction.
+In private chat

+ +
+ +
+
+ +
+ + + + + + + + diff --git a/data/corefork.telegram.org/stickers.html b/data/corefork.telegram.org/stickers.html new file mode 100644 index 0000000000..375c1fe04b --- /dev/null +++ b/data/corefork.telegram.org/stickers.html @@ -0,0 +1,249 @@ + + + + + Telegram Stickers + + + + + + + + + + + + + +
+ +
+
+
+
+

Telegram Stickers

+ +

All users can create, send and share custom artwork using Telegram's open Sticker Platform. Stickers take many forms – from basic images to stunning vector animations.

+

To start building your own custom sets, click below:

+ +

Animated Stickers

+

Telegram stickers can move with smooth 60 FPS animations to bring your characters to life in high-resolution.

+
+

Animated stickers use Telegram's unique .TGS format – click here for Video Stickers made in .WEBM format.

+
+

Creating Animated Stickers

+

To create vector animated stickers you will need the following:

+
    +
  1. Any vector graphics editor that allows exporting vector objects to Adobe After Effects to turn them into animations.
  2. +
  3. Adobe After Effects.
  4. +
  5. The Bodymovin-TG plugin, a fork of Bodymovin for Adobe After Effects that can be used to export animations to .TGS, the Telegram animated sticker format.
  6. +
+
+

The Lottie-based .TGS format allows for incredibly detailed stickers that are less than 30 KB in size – six times smaller than the average photo.

+
+

Animated Sticker Requirements

+
    +
  • Sticker/canvas size must be 512Ρ…512 pixels.
  • +
  • Sticker objects must not leave the canvas.
  • +
  • Animation length must not exceed 3 seconds.
  • +
  • All animations must be looped.
  • +
  • Sticker 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 stickers: 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 Animated Stickers

+

When your stickers are ready, send the /newanimated command to the @Stickers bot – then send it the .TGS files.

+

Your set will need an icon. Icons for animated sticker sets must be 100x100 pixels, with a looped animation not exceeding 3 seconds.

+
+

Video Stickers

+

Video Stickers are 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 Video Stickers

+

To create Video Stickers, you only need editing software that lets you export your project as a .WEBM video file (alpha channel no longer required).

+

Video Sticker Requirements

+
+

See this Encoding .WEBM with VP9 Guide for details

+
+
    +
  • One side of the sticker must be exactly 512 pixels in size – the other side can be 512 pixels or less.
  • +
  • Video duration must not exceed 3 seconds.
  • +
  • Frame rate can be up to 30 FPS.
  • +
  • Video must have a transparent layer (this is no longer required).
  • +
  • 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 Video Stickers

+

Once your stickers are ready, send the /newvideo command to the @Stickers bot – then send it the .WEBM files.

+

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

+

Turn your favorite drawings and memes into packs of images that are easily accessible on any device – no more digging through your gallery.

+

Creating Static Stickers

+

To create static stickers for the Telegram platform, you only need an image editor that lets you export in .PNG or .WEBP format.

+

Static Sticker Requirements

+
    +
  • One side of the sticker must be exactly 512 pixels in size – the other side can be 512 pixels or less.
  • +
  • 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 Static Stickers

+

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.

+
+

For more info about using the @Stickers bot, click here.

+
+
+

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.

+
+ +
+ +
+
+ +
+ + + + + +