From ba343ade2fc9dcdcb66e0a950c7e37c3a4417a67 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 3 Sep 2022 08:32:52 +0000 Subject: [PATCH] Update content of files --- .../api/animated-emojis.html | 12 +- data/web/corefork.telegram.org/api/links.html | 18 +- .../corefork.telegram.org/api/reactions.html | 3 +- .../web/corefork.telegram.org/api/rights.html | 2 +- .../corefork.telegram.org/api/stickers.html | 280 ++++++++++++++++++ 5 files changed, 300 insertions(+), 15 deletions(-) create mode 100644 data/web/corefork.telegram.org/api/stickers.html diff --git a/data/web/corefork.telegram.org/api/animated-emojis.html b/data/web/corefork.telegram.org/api/animated-emojis.html index 9bef1fff9a..d1a1d24578 100644 --- a/data/web/corefork.telegram.org/api/animated-emojis.html +++ b/data/web/corefork.telegram.org/api/animated-emojis.html @@ -42,7 +42,10 @@

Animated Emojis

-

Graphical telegram clients should transform emojis into their respective animated version.

+
+ +

Graphical telegram clients should transform emojis into their respective animated version.

+

Animated emojis

inputStickerSetAnimatedEmoji#28703c8 = InputStickerSet;
 
 messages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = messages.StickerSet;
@@ -182,8 +185,11 @@ After 1 second has elapsed with no more taps, the local list should be cleared a
 
- - + + + diff --git a/data/web/corefork.telegram.org/api/links.html b/data/web/corefork.telegram.org/api/links.html index 011f0c63ed..55665e138e 100644 --- a/data/web/corefork.telegram.org/api/links.html +++ b/data/web/corefork.telegram.org/api/links.html @@ -224,11 +224,11 @@ tg://resolve?domain=<username>&livestream=<invite_hash>

Stickerset links

-

Used to import stickersets:

+

Used to import stickersets as described here ».

t.me syntax:

-
t.me/addstickers/<name>
+
t.me/addstickers/<slug>

tg: syntax:

-
tg://addstickers?set=<name>
+
tg://addstickers?set=<slug>

Parameters:

@@ -240,18 +240,18 @@ tg://resolve?domain=<username>&livestream=<invite_hash> - + - +
nameslug RequiredStickerset nameStickerset short name, used when importing stickers.

Custom emoji stickerset links

Used to import custom emoji stickersets:

t.me syntax:

-
t.me/addemoji/<name>
+
t.me/addemoji/<slug>

tg: syntax:

-
tg://addemoji?set=<name>
+
tg://addemoji?set=<slug>

Parameters:

@@ -263,9 +263,9 @@ tg://resolve?domain=<username>&livestream=<invite_hash> - + - +
nameslug RequiredStickerset nameStickerset short name, used when importing stickers.
diff --git a/data/web/corefork.telegram.org/api/reactions.html b/data/web/corefork.telegram.org/api/reactions.html index 0a875ace7a..d62d421ee0 100644 --- a/data/web/corefork.telegram.org/api/reactions.html +++ b/data/web/corefork.telegram.org/api/reactions.html @@ -102,8 +102,7 @@ This value is synced across devices and can be fetched using messages.getUnreadReactions can be used to

-

Chat and channel administrators can use messages.setChatAvailableReactions to restrict the set of reactions that can be used in the chat or channel.

+

Chat and channel administrators can use messages.setChatAvailableReactions to restrict the set of reactions that can be used in a chat or channel.

diff --git a/data/web/corefork.telegram.org/api/rights.html b/data/web/corefork.telegram.org/api/rights.html index 94fe1477c4..31241f9055 100644 --- a/data/web/corefork.telegram.org/api/rights.html +++ b/data/web/corefork.telegram.org/api/rights.html @@ -60,7 +60,7 @@

Permissions are defined by the chatBannedRights constructor: all flags can be used except for view_messages, for more info see the constructor page.

Suggested bot rights

Bots can suggest a set of admin rights when being added to groups and channels.

-

Bots can use bots.setBotBroadcastDefaultAdminRights to indicate a suggested set of admin rights » to use when adding the bot to a channel, and [bots.setBotGroupDefaultAdminRights] when adding the bot to a group.

+

Bots can use bots.setBotBroadcastDefaultAdminRights to indicate a suggested set of admin rights » to use when adding the bot to a channel, and bots.setBotGroupDefaultAdminRights when adding the bot to a group.

These suggested admin rights are contained in the bot_broadcast_admin_rights and bot_group_admin_rights paremeters of userFull, obtainable using users.getFullUser.

A client application trying to add a bot as admin should fetch the default rights and present them as editable defaults to the user: the rights can then be modified before setting the bot as admin.

Note that admin rights suggested by a bot deep link take priority over the suggested rights specified by bot_broadcast_admin_rights and bot_group_admin_rights: they can still be modified by the user before setting the bot as admin.

diff --git a/data/web/corefork.telegram.org/api/stickers.html b/data/web/corefork.telegram.org/api/stickers.html new file mode 100644 index 0000000000..92d4acfcfe --- /dev/null +++ b/data/web/corefork.telegram.org/api/stickers.html @@ -0,0 +1,280 @@ + + + + + Stickers + + + + + + + + + + + + + + + + +
+ +
+
+
+ +

Stickers

+ +
+ +

Telegram clients support displaying static and animated stickers.

+
documentAttributeSticker#6319d612 flags:# mask:flags.1?true alt:string stickerset:InputStickerSet mask_coords:flags.0?MaskCoords = DocumentAttribute;
+documentAttributeHasStickers#9801d2f7 = DocumentAttribute;
+documentAttributeCustomEmoji#fd149899 flags:# free:flags.0?true alt:string stickerset:InputStickerSet = DocumentAttribute;
+
+messages.stickersNotModified#f1749a22 = messages.Stickers;
+messages.stickers#30a6ec7e hash:long stickers:Vector<Document> = messages.Stickers;
+
+
+messages.allStickersNotModified#e86602c3 = messages.AllStickers;
+messages.allStickers#cdbbcebb hash:long sets:Vector<StickerSet> = messages.AllStickers;
+
+messages.featuredStickersNotModified#c6dc0c66 count:int = messages.FeaturedStickers;
+messages.featuredStickers#be382906 flags:# premium:flags.0?true hash:long count:int sets:Vector<StickerSetCovered> unread:Vector<long> = messages.FeaturedStickers;
+
+messages.recentStickersNotModified#b17f890 = messages.RecentStickers;
+messages.recentStickers#88d37c56 hash:long packs:Vector<StickerPack> stickers:Vector<Document> dates:Vector<int> = messages.RecentStickers;
+
+messages.archivedStickers#4fcba9c8 count:int sets:Vector<StickerSetCovered> = messages.ArchivedStickers;
+
+stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered;
+stickerSetMultiCovered#3407e51b set:StickerSet covers:Vector<Document> = StickerSetCovered;
+stickerSetFullCovered#1aed5ee5 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = StickerSetCovered;
+
+inputStickeredMediaPhoto#4a992157 id:InputPhoto = InputStickeredMedia;
+inputStickeredMediaDocument#438865b id:InputDocument = InputStickeredMedia;
+inputStickerSetItem#ffa0a496 flags:# document:InputDocument emoji:string mask_coords:flags.0?MaskCoords = InputStickerSetItem;
+
+channelAdminLogEventActionChangeStickerSet#b1c3caa7 prev_stickerset:InputStickerSet new_stickerset:InputStickerSet = ChannelAdminLogEventAction;
+
+messages.favedStickersNotModified#9e8fa6d3 = messages.FavedStickers;
+messages.favedStickers#2cb51097 hash:long packs:Vector<StickerPack> stickers:Vector<Document> = messages.FavedStickers;
+
+recentMeUrlStickerSet#bc0a57dc url:string set:StickerSetCovered = RecentMeUrl;
+
+messages.foundStickerSetsNotModified#d54b65d = messages.FoundStickerSets;
+messages.foundStickerSets#8af09dd2 hash:long sets:Vector<StickerSetCovered> = messages.FoundStickerSets;
+
+chatBannedRights#9f120418 flags:# view_messages:flags.0?true send_messages:flags.1?true send_media:flags.2?true send_stickers:flags.3?true send_gifs:flags.4?true send_games:flags.5?true send_inline:flags.6?true embed_links:flags.7?true send_polls:flags.8?true change_info:flags.10?true invite_users:flags.15?true pin_messages:flags.17?true until_date:int = ChatBannedRights;
+
+stickers.suggestedShortName#85fea03f short_name:string = stickers.SuggestedShortName;
+
+---functions---
+
+messages.getStickers#d5a5d3a1 emoticon:string hash:long = messages.Stickers;
+messages.getAllStickers#b8a0a1a8 hash:long = messages.AllStickers;
+
+messages.getFeaturedStickers#64780b14 hash:long = messages.FeaturedStickers;
+messages.readFeaturedStickers#5b118126 id:Vector<long> = Bool;
+
+messages.getRecentStickers#9da9403b flags:# attached:flags.0?true hash:long = messages.RecentStickers;
+messages.saveRecentSticker#392718f8 flags:# attached:flags.0?true id:InputDocument unsave:Bool = Bool;
+messages.clearRecentStickers#8999602d flags:# attached:flags.0?true = Bool;
+
+messages.getArchivedStickers#57f17692 flags:# masks:flags.0?true emojis:flags.1?true offset_id:long limit:int = messages.ArchivedStickers;
+
+messages.getMaskStickers#640f82b8 hash:long = messages.AllStickers;
+
+messages.getAttachedStickers#cc5b67cc media:InputStickeredMedia = Vector<StickerSetCovered>;
+
+messages.getFavedStickers#4f1aaa9 hash:long = messages.FavedStickers;
+messages.faveSticker#b9ffc55b id:InputDocument unfave:Bool = Bool;
+
+messages.searchStickerSets#35705b8a flags:# exclude_featured:flags.0?true q:string hash:long = messages.FoundStickerSets;
+
+messages.toggleStickerSets#b5052fea flags:# uninstall:flags.0?true archive:flags.1?true unarchive:flags.2?true stickersets:Vector<InputStickerSet> = Bool;
+
+messages.getOldFeaturedStickers#7ed094a1 offset:int limit:int hash:long = messages.FeaturedStickers;
+
+messages.getEmojiStickers#fbfca18f hash:long = messages.AllStickers;
+messages.getFeaturedEmojiStickers#ecf6736 hash:long = messages.FeaturedStickers;
+
+channels.setStickers#ea8ca4f9 channel:InputChannel stickerset:InputStickerSet = Bool;
+

Sticker packs

+
inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
+inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
+inputStickerSetAnimatedEmoji#28703c8 = InputStickerSet;
+inputStickerSetAnimatedEmojiAnimations#cde3739 = InputStickerSet;
+inputStickerSetDice#e67f520e emoticon:string = InputStickerSet;
+inputStickerSetPremiumGifts#c88b3b02 = InputStickerSet;
+
+messages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = messages.StickerSet;
+messages.stickerSetNotModified#d3f924eb = messages.StickerSet;
+
+stickerSet#2dd14edc flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true videos:flags.6?true emojis:flags.7?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int thumb_document_id:flags.8?long count:int hash:int = StickerSet;
+
+stickerPack#12b299d4 emoticon:string documents:Vector<long> = StickerPack;
+
+messages.stickerSetInstallResultSuccess#38641628 = messages.StickerSetInstallResult;
+messages.stickerSetInstallResultArchive#35e410a8 sets:Vector<StickerSetCovered> = messages.StickerSetInstallResult;
+
+---functions---
+
+messages.getStickerSet#c8a0ec74 stickerset:InputStickerSet hash:int = messages.StickerSet;
+messages.installStickerSet#c78fe460 stickerset:InputStickerSet archived:Bool = messages.StickerSetInstallResult;
+messages.uninstallStickerSet#f96e55de stickerset:InputStickerSet = Bool;
+messages.reorderStickerSets#78337739 flags:# masks:flags.0?true emojis:flags.1?true order:Vector<long> = Bool;
+

Stickers are grouped together in so-called sticker packs: however, in the API they're referred to as "sticker sets", and the name "sticker pack" is reserved for something else, read on for more info.

+

Use messages.getStickerSet to fetch information about the stickerset, providing the following parameters:

+ +

The method will return a messages.stickerSetNotModified if a non-zero hash is provided and the stickerset wasn't modified since the last time we fetched it.
+Otherwise, a messages.stickerSet will be returned, containing:

+
    +
  • A stickerSet constructor with info about the stickerset
  • +
  • A vector of document, containing all the stickers. +Note that even if we provided an old hash and just a few stickers were modified, all stickers will be returned anyway.
  • +
  • A vector of stickerPack constructors, containing all the stickers IDs in the stickerpack, grouped by emoji.
    +The main emoji to use when previewing stickers in the chat list is present in the alt field of the document.
    +This field is actually used to allow associating more than one emoji to a sticker: this means that the same document ID may be present in multiple stickerPacks.
  • +
+

Displaying stickers

+
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;
+
+documentAttributeSticker#6319d612 flags:# mask:flags.1?true alt:string stickerset:InputStickerSet mask_coords:flags.0?MaskCoords = DocumentAttribute;
+
+inputStickerSetEmpty#ffb62b95 = InputStickerSet;
+inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
+inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
+inputStickerSetAnimatedEmoji#28703c8 = InputStickerSet;
+inputStickerSetDice#e67f520e emoticon:string = InputStickerSet;
+inputStickerSetAnimatedEmojiAnimations#cde3739 = InputStickerSet;
+inputStickerSetPremiumGifts#c88b3b02 = InputStickerSet;
+

Stickers are contained in document constructors attached to messages, and always have an attribute of type documentAttributeSticker.

+

The documentAttributeSticker contains information about the associated stickerset, the emoji that represents the sticker,

+

Image stickers

+

Image stickers are simple

+

Creating stickersets

+
---functions---
+
+stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true animated:flags.1?true videos:flags.4?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector<InputStickerSetItem> software:flags.3?string = messages.StickerSet;
+stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet;
+stickers.changeStickerPosition#ffb6d4ca sticker:InputDocument position:int = messages.StickerSet;
+stickers.addStickerToSet#8653febe stickerset:InputStickerSet sticker:InputStickerSetItem = messages.StickerSet;
+stickers.setStickerSetThumb#9a364e30 stickerset:InputStickerSet thumb:InputDocument = messages.StickerSet;
+stickers.checkShortName#284b3639 short_name:string = Bool;
+stickers.suggestShortName#4dafc503 title:string = stickers.SuggestedShortName;
+

Sticker suggestions

+
    +
  • stickers_premium_by_emoji_num - Defines how many premium stickers to show in the sticker suggestion popup when entering an emoji into the text field, see the sticker docs for more info (integer, defaults to 0):
      +
    • For non-Premium users, the suggested sticker list should have at most this many premium stickers at the end.
    • +
    • For Premium users, the suggested sticker list should have at most this many premium stickers, ordered as specified by the stickers_normal_by_emoji_per_premium_num field.
    • +
    +
  • +
  • stickers_normal_by_emoji_per_premium_num - For Premium users, the sticker suggestion popup should show this many normal stickers, then o (integer, defaults to 2)
  • +
+ +
+ +
+
+ +
+ + + + + + + +