Ver código fonte

update to LAYER 137 (#226)

* update to LAYER 137

* add: noforwards in customMessage,sendMessage,sendMedia,forwardMessage. reactions in customMessage
butthx 3 anos atrás
pai
commit
809418c27a

+ 1 - 1
gramjs/Version.ts

@@ -1 +1 @@
-export const version = "2.1.0";
+export const version = "2.2.0";

+ 8 - 1
gramjs/client/messages.ts

@@ -523,6 +523,7 @@ export interface SendMessageParams {
     supportStreaming?: boolean;
     /** If set, the message won't send immediately, and instead it will be scheduled to be automatically sent at a later time. */
     schedule?: DateLike;
+    noforwards?: boolean;
 }
 
 /** interface used for forwarding messages */
@@ -536,6 +537,7 @@ export interface ForwardMessagesParams {
     silent?: boolean;
     /** If set, the message(s) won't forward immediately, and instead they will be scheduled to be automatically sent at a later time. */
     schedule?: DateLike;
+    noforwards?: boolean;
 }
 
 /** Interface for editing messages */
@@ -680,6 +682,7 @@ export async function sendMessage(
         silent,
         supportStreaming,
         schedule,
+        noforwards,
     }: SendMessageParams = {}
 ) {
     if (file) {
@@ -701,6 +704,7 @@ export async function sendMessage(
             silent: silent,
             scheduleDate: schedule,
             buttons: buttons,
+            noforwards: noforwards,
         });
     }
     entity = await client.getInputEntity(entity);
@@ -741,6 +745,7 @@ export async function sendMessage(
             clearDraft: clearDraft,
             noWebpage: !(message.media instanceof Api.MessageMediaWebPage),
             scheduleDate: schedule,
+            noforwards: noforwards,
         });
         message = message.message;
     } else {
@@ -766,6 +771,7 @@ export async function sendMessage(
             silent: silent,
             replyMarkup: client.buildReplyMarkup(buttons),
             scheduleDate: schedule,
+            noforwards: noforwards,
         });
     }
     const result = await client.invoke(request);
@@ -791,7 +797,7 @@ export async function sendMessage(
 export async function forwardMessages(
     client: TelegramClient,
     entity: EntityLike,
-    { messages, fromPeer, silent, schedule }: ForwardMessagesParams
+    { messages, fromPeer, silent, schedule, noforwards }: ForwardMessagesParams
 ) {
     if (!isArrayLike(messages)) {
         messages = [messages];
@@ -838,6 +844,7 @@ export async function forwardMessages(
             toPeer: entity,
             silent: silent,
             scheduleDate: schedule,
+            noforwards: noforwards,
         });
         const result = await client.invoke(request);
         sent.push(

+ 3 - 0
gramjs/client/uploads.ts

@@ -223,6 +223,7 @@ export interface SendFileInterface {
     buttons?: MarkupLike;
     /** How many workers to use to upload the file. anything above 16 is unstable. */
     workers?: number;
+    noforwards?: boolean;
 }
 
 interface FileToMediaInterface {
@@ -445,6 +446,7 @@ export async function sendFile(
         supportsStreaming = false,
         scheduleDate,
         workers = 1,
+        noforwards,
     }: SendFileInterface
 ) {
     if (!file) {
@@ -493,6 +495,7 @@ export async function sendFile(
         silent: silent,
         scheduleDate: scheduleDate,
         clearDraft: clearDraft,
+        noforwards: noforwards,
     });
     const result = await client.invoke(request);
     return client._getResponseMessage(request, result, entity) as Api.Message;

+ 1 - 1
gramjs/tl/AllTLObjects.ts

@@ -1,6 +1,6 @@
 import { Api } from "./";
 
-export const LAYER = 135;
+export const LAYER = 137;
 const tlobjects: any = {};
 
 for (const tl of Object.values(Api)) {

+ 294 - 10
gramjs/tl/api.d.ts

@@ -16,7 +16,7 @@ export namespace Api {
     type float = number;
     type int128 = BigInteger;
     type int256 = BigInteger;
-    type long = BigInteger | string;
+    type long = BigInteger;
     type bytes = Buffer;
     class VirtualClass<Args extends AnyLiteral> {
         static CONSTRUCTOR_ID: number;
@@ -1010,8 +1010,9 @@ export namespace Api {
         themeEmoticon?: string;
         requestsPending?: int;
         recentRequesters?: long[];
+        availableReactions?: string[];
     }> {
-        CONSTRUCTOR_ID: 1185349556;
+        CONSTRUCTOR_ID: 3515802150;
         SUBCLASS_OF_ID: 3566872215;
         classType: "constructor";
         className: "ChatFull";
@@ -1034,6 +1035,7 @@ export namespace Api {
         themeEmoticon?: string;
         requestsPending?: int;
         recentRequesters?: long[];
+        availableReactions?: string[];
     }
     export class ChannelFull extends VirtualClass<{
         // flags: null;
@@ -1079,8 +1081,9 @@ export namespace Api {
         requestsPending?: int;
         recentRequesters?: long[];
         defaultSendAs?: Api.TypePeer;
+        availableReactions?: string[];
     }> {
-        CONSTRUCTOR_ID: 1449537070;
+        CONSTRUCTOR_ID: 3778821408;
         SUBCLASS_OF_ID: 3566872215;
         classType: "constructor";
         className: "ChannelFull";
@@ -1128,6 +1131,7 @@ export namespace Api {
         requestsPending?: int;
         recentRequesters?: long[];
         defaultSendAs?: Api.TypePeer;
+        availableReactions?: string[];
     }
     export class ChatParticipant extends VirtualClass<{
         userId: long;
@@ -1235,7 +1239,7 @@ export namespace Api {
         peerId?: Api.TypePeer;
     }
     export class Message extends CustomMessage {
-        CONSTRUCTOR_ID: 2245446626;
+        CONSTRUCTOR_ID: 940666592;
         SUBCLASS_OF_ID: 2030045667;
         classType: "request";
         className: "Message";
@@ -3671,6 +3675,20 @@ export namespace Api {
         invite: Api.TypeExportedChatInvite;
         qts: int;
     }
+    export class UpdateMessageReactions extends VirtualClass<{
+        peer: Api.TypePeer;
+        msgId: int;
+        reactions: Api.TypeMessageReactions;
+    }> {
+        CONSTRUCTOR_ID: 357013699;
+        SUBCLASS_OF_ID: 2676568142;
+        classType: "constructor";
+        className: "UpdateMessageReactions";
+        static fromReader(reader: Reader): UpdateMessageReactions;
+        peer: Api.TypePeer;
+        msgId: int;
+        reactions: Api.TypeMessageReactions;
+    }
     export class UpdatesTooLong extends VirtualClass<void> {
         CONSTRUCTOR_ID: 3809980286;
         SUBCLASS_OF_ID: 2331323052;
@@ -5627,6 +5645,18 @@ export namespace Api {
         offset: int;
         length: int;
     }
+    export class MessageEntitySpoiler extends VirtualClass<{
+        offset: int;
+        length: int;
+    }> {
+        CONSTRUCTOR_ID: 852137487;
+        SUBCLASS_OF_ID: 3479443932;
+        classType: "constructor";
+        className: "MessageEntitySpoiler";
+        static fromReader(reader: Reader): MessageEntitySpoiler;
+        offset: int;
+        length: int;
+    }
     export class InputChannelEmpty extends VirtualClass<void> {
         CONSTRUCTOR_ID: 4002160262;
         SUBCLASS_OF_ID: 1089602301;
@@ -8195,6 +8225,20 @@ export namespace Api {
         ): ChannelAdminLogEventActionSendMessage;
         message: Api.TypeMessage;
     }
+    export class ChannelAdminLogEventActionChangeAvailableReactions extends VirtualClass<{
+        prevValue: string[];
+        newValue: string[];
+    }> {
+        CONSTRUCTOR_ID: 2633496426;
+        SUBCLASS_OF_ID: 2998503411;
+        classType: "constructor";
+        className: "ChannelAdminLogEventActionChangeAvailableReactions";
+        static fromReader(
+            reader: Reader
+        ): ChannelAdminLogEventActionChangeAvailableReactions;
+        prevValue: string[];
+        newValue: string[];
+    }
     export class ChannelAdminLogEvent extends VirtualClass<{
         id: long;
         date: int;
@@ -10449,20 +10493,24 @@ export namespace Api {
     export class SponsoredMessage extends VirtualClass<{
         // flags: null;
         randomId: bytes;
-        fromId: Api.TypePeer;
+        fromId?: Api.TypePeer;
+        chatInvite?: Api.TypeChatInvite;
+        chatInviteHash?: string;
         channelPost?: int;
         startParam?: string;
         message: string;
         entities?: Api.TypeMessageEntity[];
     }> {
-        CONSTRUCTOR_ID: 3511804314;
+        CONSTRUCTOR_ID: 981691896;
         SUBCLASS_OF_ID: 3780630582;
         classType: "constructor";
         className: "SponsoredMessage";
         static fromReader(reader: Reader): SponsoredMessage;
         // flags: null;
         randomId: bytes;
-        fromId: Api.TypePeer;
+        fromId?: Api.TypePeer;
+        chatInvite?: Api.TypeChatInvite;
+        chatInviteHash?: string;
         channelPost?: int;
         startParam?: string;
         message: string;
@@ -10498,6 +10546,82 @@ export namespace Api {
         date: int;
         offset: int;
     }
+    export class ReactionCount extends VirtualClass<{
+        // flags: null;
+        chosen?: boolean;
+        reaction: string;
+        count: int;
+    }> {
+        CONSTRUCTOR_ID: 1873957073;
+        SUBCLASS_OF_ID: 3523792447;
+        classType: "constructor";
+        className: "ReactionCount";
+        static fromReader(reader: Reader): ReactionCount;
+        // flags: null;
+        chosen?: boolean;
+        reaction: string;
+        count: int;
+    }
+    export class MessageReactions extends VirtualClass<{
+        // flags: null;
+        min?: boolean;
+        canSeeList?: boolean;
+        results: Api.TypeReactionCount[];
+        recentReactons?: Api.TypeMessageUserReaction[];
+    }> {
+        CONSTRUCTOR_ID: 142306870;
+        SUBCLASS_OF_ID: 2321221404;
+        classType: "constructor";
+        className: "MessageReactions";
+        static fromReader(reader: Reader): MessageReactions;
+        // flags: null;
+        min?: boolean;
+        canSeeList?: boolean;
+        results: Api.TypeReactionCount[];
+        recentReactons?: Api.TypeMessageUserReaction[];
+    }
+    export class MessageUserReaction extends VirtualClass<{
+        userId: long;
+        reaction: string;
+    }> {
+        CONSTRUCTOR_ID: 2468889850;
+        SUBCLASS_OF_ID: 1905515325;
+        classType: "constructor";
+        className: "MessageUserReaction";
+        static fromReader(reader: Reader): MessageUserReaction;
+        userId: long;
+        reaction: string;
+    }
+    export class AvailableReaction extends VirtualClass<{
+        // flags: null;
+        inactive?: boolean;
+        reaction: string;
+        title: string;
+        staticIcon: Api.TypeDocument;
+        appearAnimation: Api.TypeDocument;
+        selectAnimation: Api.TypeDocument;
+        activateAnimation: Api.TypeDocument;
+        effectAnimation: Api.TypeDocument;
+        aroundAnimation?: Api.TypeDocument;
+        centerIcon?: Api.TypeDocument;
+    }> {
+        CONSTRUCTOR_ID: 3229084673;
+        SUBCLASS_OF_ID: 2350685555;
+        classType: "constructor";
+        className: "AvailableReaction";
+        static fromReader(reader: Reader): AvailableReaction;
+        // flags: null;
+        inactive?: boolean;
+        reaction: string;
+        title: string;
+        staticIcon: Api.TypeDocument;
+        appearAnimation: Api.TypeDocument;
+        selectAnimation: Api.TypeDocument;
+        activateAnimation: Api.TypeDocument;
+        effectAnimation: Api.TypeDocument;
+        aroundAnimation?: Api.TypeDocument;
+        centerIcon?: Api.TypeDocument;
+    }
     export class ResPQ extends VirtualClass<{
         nonce: int128;
         serverNonce: int128;
@@ -12552,6 +12676,43 @@ export namespace Api {
             chats: Api.TypeChat[];
             users: Api.TypeUser[];
         }
+        export class MessageReactionsList extends VirtualClass<{
+            // flags: null;
+            count: int;
+            reactions: Api.TypeMessageUserReaction[];
+            users: Api.TypeUser[];
+            nextOffset?: string;
+        }> {
+            CONSTRUCTOR_ID: 2741408316;
+            SUBCLASS_OF_ID: 1627186662;
+            classType: "constructor";
+            className: "messages.MessageReactionsList";
+            static fromReader(reader: Reader): MessageReactionsList;
+            // flags: null;
+            count: int;
+            reactions: Api.TypeMessageUserReaction[];
+            users: Api.TypeUser[];
+            nextOffset?: string;
+        }
+        export class AvailableReactionsNotModified extends VirtualClass<void> {
+            CONSTRUCTOR_ID: 2668042583;
+            SUBCLASS_OF_ID: 3827740034;
+            classType: "constructor";
+            className: "messages.AvailableReactionsNotModified";
+            static fromReader(reader: Reader): AvailableReactionsNotModified;
+        }
+        export class AvailableReactions extends VirtualClass<{
+            hash: int;
+            reactions: Api.TypeAvailableReaction[];
+        }> {
+            CONSTRUCTOR_ID: 1989032621;
+            SUBCLASS_OF_ID: 3827740034;
+            classType: "constructor";
+            className: "messages.AvailableReactions";
+            static fromReader(reader: Reader): AvailableReactions;
+            hash: int;
+            reactions: Api.TypeAvailableReaction[];
+        }
     }
 
     export namespace updates {
@@ -13891,6 +14052,10 @@ export namespace Api {
         export type TypeSearchResultsPositions =
             messages.SearchResultsPositions;
         export type TypePeerSettings = messages.PeerSettings;
+        export type TypeMessageReactionsList = messages.MessageReactionsList;
+        export type TypeAvailableReactions =
+            | messages.AvailableReactionsNotModified
+            | messages.AvailableReactions;
     }
 
     export namespace updates {
@@ -15873,6 +16038,7 @@ export namespace Api {
                 silent?: boolean;
                 background?: boolean;
                 clearDraft?: boolean;
+                noforwards?: boolean;
                 peer: Api.TypeEntityLike;
                 replyToMsgId?: MessageIDLike;
                 message: string;
@@ -15894,6 +16060,7 @@ export namespace Api {
             silent?: boolean;
             background?: boolean;
             clearDraft?: boolean;
+            noforwards?: boolean;
             peer: Api.TypeEntityLike;
             replyToMsgId?: MessageIDLike;
             message: string;
@@ -15909,6 +16076,7 @@ export namespace Api {
                 silent?: boolean;
                 background?: boolean;
                 clearDraft?: boolean;
+                noforwards?: boolean;
                 peer: Api.TypeEntityLike;
                 replyToMsgId?: MessageIDLike;
                 media: Api.TypeInputMedia;
@@ -15930,6 +16098,7 @@ export namespace Api {
             silent?: boolean;
             background?: boolean;
             clearDraft?: boolean;
+            noforwards?: boolean;
             peer: Api.TypeEntityLike;
             replyToMsgId?: MessageIDLike;
             media: Api.TypeInputMedia;
@@ -15948,6 +16117,7 @@ export namespace Api {
                 withMyScore?: boolean;
                 dropAuthor?: boolean;
                 dropMediaCaptions?: boolean;
+                noforwards?: boolean;
                 fromPeer: Api.TypeEntityLike;
                 id: int[];
                 randomId: long[];
@@ -15968,6 +16138,7 @@ export namespace Api {
             withMyScore?: boolean;
             dropAuthor?: boolean;
             dropMediaCaptions?: boolean;
+            noforwards?: boolean;
             fromPeer: Api.TypeEntityLike;
             id: int[];
             randomId: long[];
@@ -17317,6 +17488,7 @@ export namespace Api {
                 silent?: boolean;
                 background?: boolean;
                 clearDraft?: boolean;
+                noforwards?: boolean;
                 peer: Api.TypeEntityLike;
                 replyToMsgId?: MessageIDLike;
                 multiMedia: Api.TypeInputSingleMedia[];
@@ -17334,6 +17506,7 @@ export namespace Api {
             silent?: boolean;
             background?: boolean;
             clearDraft?: boolean;
+            noforwards?: boolean;
             peer: Api.TypeEntityLike;
             replyToMsgId?: MessageIDLike;
             multiMedia: Api.TypeInputSingleMedia[];
@@ -18280,6 +18453,104 @@ export namespace Api {
             peer: Api.TypeEntityLike;
             sendAs: Api.TypeEntityLike;
         }
+        export class SendReaction extends Request<
+            Partial<{
+                // flags: null;
+                peer: Api.TypeEntityLike;
+                msgId: MessageIDLike;
+                reaction?: string;
+            }>,
+            Api.TypeUpdates
+        > {
+            CONSTRUCTOR_ID: 627641572;
+            SUBCLASS_OF_ID: 2331323052;
+            classType: "request";
+            className: "messages.SendReaction";
+            static fromReader(reader: Reader): SendReaction;
+            // flags: null;
+            peer: Api.TypeEntityLike;
+            msgId: MessageIDLike;
+            reaction?: string;
+        }
+        export class GetMessagesReactions extends Request<
+            Partial<{
+                peer: Api.TypeEntityLike;
+                id: int[];
+            }>,
+            Api.TypeUpdates
+        > {
+            CONSTRUCTOR_ID: 2344259814;
+            SUBCLASS_OF_ID: 2331323052;
+            classType: "request";
+            className: "messages.GetMessagesReactions";
+            static fromReader(reader: Reader): GetMessagesReactions;
+            peer: Api.TypeEntityLike;
+            id: int[];
+        }
+        export class GetMessageReactionsList extends Request<
+            Partial<{
+                // flags: null;
+                peer: Api.TypeEntityLike;
+                id: int;
+                reaction?: string;
+                offset?: string;
+                limit: int;
+            }>,
+            messages.TypeMessageReactionsList
+        > {
+            CONSTRUCTOR_ID: 3773721463;
+            SUBCLASS_OF_ID: 1627186662;
+            classType: "request";
+            className: "messages.GetMessageReactionsList";
+            static fromReader(reader: Reader): GetMessageReactionsList;
+            // flags: null;
+            peer: Api.TypeEntityLike;
+            id: int;
+            reaction?: string;
+            offset?: string;
+            limit: int;
+        }
+        export class SetChatAvailableReactions extends Request<
+            Partial<{
+                peer: Api.TypeEntityLike;
+                availableReactions: string[];
+            }>,
+            Api.TypeUpdates
+        > {
+            CONSTRUCTOR_ID: 335875750;
+            SUBCLASS_OF_ID: 2331323052;
+            classType: "request";
+            className: "messages.SetChatAvailableReactions";
+            static fromReader(reader: Reader): SetChatAvailableReactions;
+            peer: Api.TypeEntityLike;
+            availableReactions: string[];
+        }
+        export class GetAvailableReactions extends Request<
+            Partial<{
+                hash: int;
+            }>,
+            messages.TypeAvailableReactions
+        > {
+            CONSTRUCTOR_ID: 417243308;
+            SUBCLASS_OF_ID: 3827740034;
+            classType: "request";
+            className: "messages.GetAvailableReactions";
+            static fromReader(reader: Reader): GetAvailableReactions;
+            hash: int;
+        }
+        export class SetDefaultReaction extends Request<
+            Partial<{
+                reaction: string;
+            }>,
+            Bool
+        > {
+            CONSTRUCTOR_ID: 3646997716;
+            SUBCLASS_OF_ID: 4122188204;
+            classType: "request";
+            className: "messages.SetDefaultReaction";
+            static fromReader(reader: Reader): SetDefaultReaction;
+            reaction: string;
+        }
     }
 
     export namespace updates {
@@ -20679,7 +20950,8 @@ export namespace Api {
         | UpdateGroupCallConnection
         | UpdateBotCommands
         | UpdatePendingJoinRequests
-        | UpdateBotChatInviteRequester;
+        | UpdateBotChatInviteRequester
+        | UpdateMessageReactions;
     export type TypeUpdates =
         | UpdatesTooLong
         | UpdateShortMessage
@@ -20840,7 +21112,8 @@ export namespace Api {
         | MessageEntityUnderline
         | MessageEntityStrike
         | MessageEntityBlockquote
-        | MessageEntityBankCard;
+        | MessageEntityBankCard
+        | MessageEntitySpoiler;
     export type TypeInputChannel =
         | InputChannelEmpty
         | InputChannel
@@ -21038,7 +21311,8 @@ export namespace Api {
         | ChannelAdminLogEventActionChangeHistoryTTL
         | ChannelAdminLogEventActionParticipantJoinByRequest
         | ChannelAdminLogEventActionToggleNoForwards
-        | ChannelAdminLogEventActionSendMessage;
+        | ChannelAdminLogEventActionSendMessage
+        | ChannelAdminLogEventActionChangeAvailableReactions;
     export type TypeChannelAdminLogEvent = ChannelAdminLogEvent;
     export type TypeChannelAdminLogEventsFilter = ChannelAdminLogEventsFilter;
     export type TypePopularContact = PopularContact;
@@ -21210,6 +21484,10 @@ export namespace Api {
     export type TypeSponsoredMessage = SponsoredMessage;
     export type TypeSearchResultsCalendarPeriod = SearchResultsCalendarPeriod;
     export type TypeSearchResultsPosition = SearchResultPosition;
+    export type TypeReactionCount = ReactionCount;
+    export type TypeMessageReactions = MessageReactions;
+    export type TypeMessageUserReaction = MessageUserReaction;
+    export type TypeAvailableReaction = AvailableReaction;
     export type TypeResPQ = ResPQ;
     export type TypeP_Q_inner_data =
         | PQInnerData
@@ -21540,6 +21818,12 @@ export namespace Api {
         | messages.HideAllChatJoinRequests
         | messages.ToggleNoForwards
         | messages.SaveDefaultSendAs
+        | messages.SendReaction
+        | messages.GetMessagesReactions
+        | messages.GetMessageReactionsList
+        | messages.SetChatAvailableReactions
+        | messages.GetAvailableReactions
+        | messages.SetDefaultReaction
         | updates.GetState
         | updates.GetDifference
         | updates.GetChannelDifference

+ 25 - 8
gramjs/tl/apiTl.js

@@ -1,4 +1,5 @@
 module.exports = `
+---types---
 boolFalse#bc799737 = Bool;
 boolTrue#997275b5 = Bool;
 true#3fedd339 = True;
@@ -79,8 +80,8 @@ chat#41cbf256 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true
 chatForbidden#6592a1a7 id:long title:string = Chat;
 channel#8261ac61 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;
 channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
-chatFull#46a6ffb4 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector<long> = ChatFull;
-channelFull#56662e2e flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer = ChatFull;
+chatFull#d18ee226 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector<long> available_reactions:flags.18?Vector<string> = ChatFull;
+channelFull#e13c3d20 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?Vector<string> = ChatFull;
 chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
 chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
 chatParticipantAdmin#a0933f5b user_id:long inviter_id:long date:int = ChatParticipant;
@@ -89,7 +90,7 @@ chatParticipants#3cbc93f8 chat_id:long participants:Vector<ChatParticipant> vers
 chatPhotoEmpty#37c1011c = ChatPhoto;
 chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
 messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
-message#85d6cbe2 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 restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int = Message;
+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;
 messageService#2b085862 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction ttl_period:flags.25?int = Message;
 messageMediaEmpty#3ded6320 = MessageMedia;
 messageMediaPhoto#695150d7 flags:# photo:flags.0?Photo ttl_seconds:flags.2?int = MessageMedia;
@@ -299,6 +300,7 @@ updateGroupCallConnection#b783982 flags:# presentation:flags.0?true params:DataJ
 updateBotCommands#4d712f2e peer:Peer bot_id:long commands:Vector<BotCommand> = Update;
 updatePendingJoinRequests#7063c3db peer:Peer requests_pending:int recent_requesters:Vector<long> = Update;
 updateBotChatInviteRequester#11dfa986 peer:Peer date:int user_id:long about:string invite:ExportedChatInvite qts:int = Update;
+updateMessageReactions#154798c3 peer:Peer msg_id:int reactions:MessageReactions = Update;
 updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
 updates.differenceEmpty#5d75a138 date:int seq:int = updates.Difference;
 updates.difference#f49ca0 new_messages:Vector<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> state:updates.State = updates.Difference;
@@ -478,6 +480,7 @@ messageEntityUnderline#9c4e7e8b offset:int length:int = MessageEntity;
 messageEntityStrike#bf0693d4 offset:int length:int = MessageEntity;
 messageEntityBlockquote#20df5d0 offset:int length:int = MessageEntity;
 messageEntityBankCard#761e6af4 offset:int length:int = MessageEntity;
+messageEntitySpoiler#32ca960f offset:int length:int = MessageEntity;
 inputChannelEmpty#ee8c1e86 = InputChannel;
 inputChannel#f35aec28 channel_id:long access_hash:long = InputChannel;
 inputChannelFromMessage#5b934f9d peer:InputPeer msg_id:int channel_id:long = InputChannel;
@@ -707,6 +710,7 @@ channelAdminLogEventActionChangeHistoryTTL#6e941a38 prev_value:int new_value:int
 channelAdminLogEventActionParticipantJoinByRequest#afb6144a invite:ExportedChatInvite approved_by:long = ChannelAdminLogEventAction;
 channelAdminLogEventActionToggleNoForwards#cb2ac766 new_value:Bool = ChannelAdminLogEventAction;
 channelAdminLogEventActionSendMessage#278f2868 message:Message = ChannelAdminLogEventAction;
+channelAdminLogEventActionChangeAvailableReactions#9cf7f76a prev_value:Vector<string> new_value:Vector<string> = ChannelAdminLogEventAction;
 channelAdminLogEvent#1fad68cd id:long date:int user_id:long action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
 channels.adminLogResults#ed8af74d events:Vector<ChannelAdminLogEvent> chats:Vector<Chat> users:Vector<User> = channels.AdminLogResults;
 channelAdminLogEventsFilter#ea107ae4 flags:# join:flags.0?true leave:flags.1?true invite:flags.2?true ban:flags.3?true unban:flags.4?true kick:flags.5?true unkick:flags.6?true promote:flags.7?true demote:flags.8?true info:flags.9?true settings:flags.10?true pinned:flags.11?true edit:flags.12?true delete:flags.13?true group_call:flags.14?true invites:flags.15?true send:flags.16?true = ChannelAdminLogEventsFilter;
@@ -931,7 +935,7 @@ botCommandScopePeerUser#a1321f3 peer:InputPeer user_id:InputUser = BotCommandSco
 account.resetPasswordFailedWait#e3779861 retry_date:int = account.ResetPasswordResult;
 account.resetPasswordRequestedWait#e9effc7d until_date:int = account.ResetPasswordResult;
 account.resetPasswordOk#e926d63e = account.ResetPasswordResult;
-sponsoredMessage#d151e19a flags:# random_id:bytes from_id:Peer channel_post:flags.2?int start_param:flags.0?string message:string entities:flags.1?Vector<MessageEntity> = SponsoredMessage;
+sponsoredMessage#3a836df8 flags:# random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string message:string entities:flags.1?Vector<MessageEntity> = SponsoredMessage;
 messages.sponsoredMessages#65a4c7d5 messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages;
 searchResultsCalendarPeriod#c9b0539f date:int min_msg_id:int max_msg_id:int count:int = SearchResultsCalendarPeriod;
 messages.searchResultsCalendar#147ee23c flags:# inexact:flags.0?true count:int min_date:int min_msg_id:int offset_id_offset:flags.1?int periods:Vector<SearchResultsCalendarPeriod> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.SearchResultsCalendar;
@@ -941,6 +945,13 @@ channels.sendAsPeers#8356cda9 peers:Vector<Peer> chats:Vector<Chat> users:Vector
 users.userFull#3b6d152e full_user:UserFull chats:Vector<Chat> users:Vector<User> = users.UserFull;
 messages.peerSettings#6880b94d settings:PeerSettings chats:Vector<Chat> users:Vector<User> = messages.PeerSettings;
 auth.loggedOut#c3a2835f flags:# future_auth_token:flags.0?bytes = auth.LoggedOut;
+reactionCount#6fb250d1 flags:# chosen:flags.0?true reaction:string count:int = ReactionCount;
+messageReactions#87b6e36 flags:# min:flags.0?true can_see_list:flags.2?true results:Vector<ReactionCount> recent_reactons:flags.1?Vector<MessageUserReaction> = MessageReactions;
+messageUserReaction#932844fa user_id:long reaction:string = MessageUserReaction;
+messages.messageReactionsList#a366923c flags:# count:int reactions:Vector<MessageUserReaction> users:Vector<User> next_offset:flags.0?string = messages.MessageReactionsList;
+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;
 ---functions---
 invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
 invokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector<long> query:!X = X;
@@ -1073,9 +1084,9 @@ messages.deleteHistory#b08f922a flags:# just_clear:flags.0?true revoke:flags.1?t
 messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector<int> = messages.AffectedMessages;
 messages.receivedMessages#5a954c0 max_id:int = Vector<ReceivedNotifyMessage>;
 messages.setTyping#58943ee2 flags:# peer:InputPeer top_msg_id:flags.0?int action:SendMessageAction = Bool;
-messages.sendMessage#d9d75a4 flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int 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.sendMedia#e25ff8e0 flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?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.forwardMessages#cc30290b flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true from_peer:InputPeer id:Vector<int> random_id:Vector<long> to_peer:InputPeer schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;
+messages.sendMessage#d9d75a4 flags:# no_webpage:flags.1?true 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 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.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.forwardMessages#cc30290b flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true noforwards:flags.14?true from_peer:InputPeer id:Vector<int> random_id:Vector<long> to_peer:InputPeer schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;
 messages.reportSpam#cf1592db peer:InputPeer = Bool;
 messages.getPeerSettings#efd9a6a2 peer:InputPeer = messages.PeerSettings;
 messages.report#8953ab4e peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool;
@@ -1154,7 +1165,7 @@ messages.faveSticker#b9ffc55b id:InputDocument unfave:Bool = Bool;
 messages.getUnreadMentions#46578472 peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
 messages.readMentions#f0189d3 peer:InputPeer = messages.AffectedHistory;
 messages.getRecentLocations#702a40e0 peer:InputPeer limit:int hash:long = messages.Messages;
-messages.sendMultiMedia#f803138f flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int multi_media:Vector<InputSingleMedia> schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;
+messages.sendMultiMedia#f803138f 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 multi_media:Vector<InputSingleMedia> schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;
 messages.uploadEncryptedFile#5057c497 peer:InputEncryptedChat file:InputEncryptedFile = EncryptedFile;
 messages.searchStickerSets#35705b8a flags:# exclude_featured:flags.0?true q:string hash:long = messages.FoundStickerSets;
 messages.getSplitRanges#1cff7e08 = Vector<MessageRange>;
@@ -1213,6 +1224,12 @@ messages.hideChatJoinRequest#7fe7e815 flags:# approved:flags.0?true peer:InputPe
 messages.hideAllChatJoinRequests#e085f4ea flags:# approved:flags.0?true peer:InputPeer link:flags.1?string = Updates;
 messages.toggleNoForwards#b11eafa2 peer:InputPeer enabled:Bool = Updates;
 messages.saveDefaultSendAs#ccfddf96 peer:InputPeer send_as:InputPeer = Bool;
+messages.sendReaction#25690ce4 flags:# 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.setChatAvailableReactions#14050ea6 peer:InputPeer available_reactions:Vector<string> = Updates;
+messages.getAvailableReactions#18dea0ac hash:int = messages.AvailableReactions;
+messages.setDefaultReaction#d960c4d4 reaction:string = Bool;
 updates.getState#edd4882a = updates.State;
 updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference;
 updates.getChannelDifference#3173d78 flags:# force:flags.0?true channel:InputChannel filter:ChannelMessagesFilter pts:int limit:int = updates.ChannelDifference;

+ 8 - 4
gramjs/tl/custom/message.ts

@@ -43,6 +43,8 @@ interface MessageBaseInterface {
     ttlPeriod?: number;
     replies?: any;
     action?: any;
+    reactions?: any;
+    noforwards?: any;
     _entities?: Map<string, Entity>;
 }
 
@@ -208,6 +210,8 @@ export class CustomMessage extends SenderGetter {
      * local database, etc.) when this threshold is met.
      */
     ttlPeriod?: number;
+    reactions?: Api.MessageReactions;
+    noforwards?: boolean;
     /** @hidden */
     _actionEntities?: any;
     /** @hidden */
@@ -253,7 +257,6 @@ export class CustomMessage extends SenderGetter {
         id,
         peerId = undefined,
         date = undefined,
-
         out = undefined,
         mentioned = undefined,
         mediaUnread = undefined,
@@ -261,9 +264,7 @@ export class CustomMessage extends SenderGetter {
         post = undefined,
         fromId = undefined,
         replyTo = undefined,
-
         message = undefined,
-
         fwdFrom = undefined,
         viaBotId = undefined,
         media = undefined,
@@ -280,8 +281,9 @@ export class CustomMessage extends SenderGetter {
         restrictionReason = undefined,
         forwards = undefined,
         replies = undefined,
-
         action = undefined,
+        reactions = undefined,
+        noforwards = undefined,
         ttlPeriod = undefined,
         _entities = new Map<string, Entity>(),
     }: MessageBaseInterface) {
@@ -326,6 +328,8 @@ export class CustomMessage extends SenderGetter {
         this.groupedId = groupedId;
         this.restrictionReason = restrictionReason;
         this.action = action;
+        this.noforwards = noforwards;
+        this.reactions = reactions;
 
         this._client = undefined;
         this._text = undefined;

+ 35 - 9
gramjs/tl/static/api.tl

@@ -1,3 +1,5 @@
+// https://core.telegram.org/schema
+
 ///////////////////////////////
 /////////////////// Layer cons
 ///////////////////////////////
@@ -28,6 +30,8 @@
 ///////// Main application API
 ///////////////////////////////
 
+---types---
+
 boolFalse#bc799737 = Bool;
 boolTrue#997275b5 = Bool;
 
@@ -128,8 +132,8 @@ chatForbidden#6592a1a7 id:long title:string = Chat;
 channel#8261ac61 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;
 channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
 
-chatFull#46a6ffb4 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector<long> = ChatFull;
-channelFull#56662e2e flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer = ChatFull;
+chatFull#d18ee226 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector<long> available_reactions:flags.18?Vector<string> = ChatFull;
+channelFull#e13c3d20 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?Vector<string> = ChatFull;
 
 chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
 chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
@@ -142,7 +146,7 @@ chatPhotoEmpty#37c1011c = ChatPhoto;
 chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
 
 messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
-message#85d6cbe2 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 restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int = Message;
+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;
 messageService#2b085862 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction ttl_period:flags.25?int = Message;
 
 messageMediaEmpty#3ded6320 = MessageMedia;
@@ -381,6 +385,7 @@ updateGroupCallConnection#b783982 flags:# presentation:flags.0?true params:DataJ
 updateBotCommands#4d712f2e peer:Peer bot_id:long commands:Vector<BotCommand> = Update;
 updatePendingJoinRequests#7063c3db peer:Peer requests_pending:int recent_requesters:Vector<long> = Update;
 updateBotChatInviteRequester#11dfa986 peer:Peer date:int user_id:long about:string invite:ExportedChatInvite qts:int = Update;
+updateMessageReactions#154798c3 peer:Peer msg_id:int reactions:MessageReactions = Update;
 
 updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
 
@@ -614,6 +619,7 @@ messageEntityUnderline#9c4e7e8b offset:int length:int = MessageEntity;
 messageEntityStrike#bf0693d4 offset:int length:int = MessageEntity;
 messageEntityBlockquote#20df5d0 offset:int length:int = MessageEntity;
 messageEntityBankCard#761e6af4 offset:int length:int = MessageEntity;
+messageEntitySpoiler#32ca960f offset:int length:int = MessageEntity;
 
 inputChannelEmpty#ee8c1e86 = InputChannel;
 inputChannel#f35aec28 channel_id:long access_hash:long = InputChannel;
@@ -919,6 +925,7 @@ channelAdminLogEventActionChangeHistoryTTL#6e941a38 prev_value:int new_value:int
 channelAdminLogEventActionParticipantJoinByRequest#afb6144a invite:ExportedChatInvite approved_by:long = ChannelAdminLogEventAction;
 channelAdminLogEventActionToggleNoForwards#cb2ac766 new_value:Bool = ChannelAdminLogEventAction;
 channelAdminLogEventActionSendMessage#278f2868 message:Message = ChannelAdminLogEventAction;
+channelAdminLogEventActionChangeAvailableReactions#9cf7f76a prev_value:Vector<string> new_value:Vector<string> = ChannelAdminLogEventAction;
 
 channelAdminLogEvent#1fad68cd id:long date:int user_id:long action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
 
@@ -1282,7 +1289,7 @@ account.resetPasswordFailedWait#e3779861 retry_date:int = account.ResetPasswordR
 account.resetPasswordRequestedWait#e9effc7d until_date:int = account.ResetPasswordResult;
 account.resetPasswordOk#e926d63e = account.ResetPasswordResult;
 
-sponsoredMessage#d151e19a flags:# random_id:bytes from_id:Peer channel_post:flags.2?int start_param:flags.0?string message:string entities:flags.1?Vector<MessageEntity> = SponsoredMessage;
+sponsoredMessage#3a836df8 flags:# random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string message:string entities:flags.1?Vector<MessageEntity> = SponsoredMessage;
 
 messages.sponsoredMessages#65a4c7d5 messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages;
 
@@ -1302,6 +1309,19 @@ messages.peerSettings#6880b94d settings:PeerSettings chats:Vector<Chat> users:Ve
 
 auth.loggedOut#c3a2835f flags:# future_auth_token:flags.0?bytes = auth.LoggedOut;
 
+reactionCount#6fb250d1 flags:# chosen:flags.0?true reaction:string count:int = ReactionCount;
+
+messageReactions#87b6e36 flags:# min:flags.0?true can_see_list:flags.2?true results:Vector<ReactionCount> recent_reactons:flags.1?Vector<MessageUserReaction> = MessageReactions;
+
+messageUserReaction#932844fa user_id:long reaction:string = MessageUserReaction;
+
+messages.messageReactionsList#a366923c flags:# count:int reactions:Vector<MessageUserReaction> users:Vector<User> next_offset:flags.0?string = messages.MessageReactionsList;
+
+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;
+
 ---functions---
 
 invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@@ -1440,9 +1460,9 @@ messages.deleteHistory#b08f922a flags:# just_clear:flags.0?true revoke:flags.1?t
 messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector<int> = messages.AffectedMessages;
 messages.receivedMessages#5a954c0 max_id:int = Vector<ReceivedNotifyMessage>;
 messages.setTyping#58943ee2 flags:# peer:InputPeer top_msg_id:flags.0?int action:SendMessageAction = Bool;
-messages.sendMessage#d9d75a4 flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int 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.sendMedia#e25ff8e0 flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?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.forwardMessages#cc30290b flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true from_peer:InputPeer id:Vector<int> random_id:Vector<long> to_peer:InputPeer schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;
+messages.sendMessage#d9d75a4 flags:# no_webpage:flags.1?true 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 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.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.forwardMessages#cc30290b flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true noforwards:flags.14?true from_peer:InputPeer id:Vector<int> random_id:Vector<long> to_peer:InputPeer schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;
 messages.reportSpam#cf1592db peer:InputPeer = Bool;
 messages.getPeerSettings#efd9a6a2 peer:InputPeer = messages.PeerSettings;
 messages.report#8953ab4e peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool;
@@ -1521,7 +1541,7 @@ messages.faveSticker#b9ffc55b id:InputDocument unfave:Bool = Bool;
 messages.getUnreadMentions#46578472 peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
 messages.readMentions#f0189d3 peer:InputPeer = messages.AffectedHistory;
 messages.getRecentLocations#702a40e0 peer:InputPeer limit:int hash:long = messages.Messages;
-messages.sendMultiMedia#f803138f flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int multi_media:Vector<InputSingleMedia> schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;
+messages.sendMultiMedia#f803138f 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 multi_media:Vector<InputSingleMedia> schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;
 messages.uploadEncryptedFile#5057c497 peer:InputEncryptedChat file:InputEncryptedFile = EncryptedFile;
 messages.searchStickerSets#35705b8a flags:# exclude_featured:flags.0?true q:string hash:long = messages.FoundStickerSets;
 messages.getSplitRanges#1cff7e08 = Vector<MessageRange>;
@@ -1580,6 +1600,12 @@ messages.hideChatJoinRequest#7fe7e815 flags:# approved:flags.0?true peer:InputPe
 messages.hideAllChatJoinRequests#e085f4ea flags:# approved:flags.0?true peer:InputPeer link:flags.1?string = Updates;
 messages.toggleNoForwards#b11eafa2 peer:InputPeer enabled:Bool = Updates;
 messages.saveDefaultSendAs#ccfddf96 peer:InputPeer send_as:InputPeer = Bool;
+messages.sendReaction#25690ce4 flags:# 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.setChatAvailableReactions#14050ea6 peer:InputPeer available_reactions:Vector<string> = Updates;
+messages.getAvailableReactions#18dea0ac hash:int = messages.AvailableReactions;
+messages.setDefaultReaction#d960c4d4 reaction:string = Bool;
 
 updates.getState#edd4882a = updates.State;
 updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference;
@@ -1728,4 +1754,4 @@ stats.getMegagroupStats#dcdf8607 flags:# dark:flags.0?true channel:InputChannel
 stats.getMessagePublicForwards#5630281b channel:InputChannel msg_id:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
 stats.getMessageStats#b6e0a3f5 flags:# dark:flags.0?true channel:InputChannel msg_id:int = stats.MessageStats;
 
-// LAYER 135
+// LAYER 137

Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 8300
package-lock.json


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "telegram",
-  "version": "2.1.0",
+  "version": "2.2.0",
   "description": "NodeJS/Browser MTProto API Telegram client library,",
   "main": "index.js",
   "types": "index.d.ts",

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff