Socket
Socket
Sign inDemoInstall

@grammyjs/types

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grammyjs/types - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

45

callback.d.ts
import { User } from "./manage";
import { Merge } from "./merge";
import { Message } from "./message";

@@ -62,31 +61,21 @@

export namespace CallbackQuery {
interface AbstractCallbackQuery {
/** Unique identifier for this query */
id: string;
/** Sender */
from: User;
/** Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old */
message?: Message;
/** Identifier of the message sent via the bot in inline mode, that originated the query. */
inline_message_id?: string;
/** Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. */
chat_instance: string;
}
export interface DataCallbackQuery extends AbstractCallbackQuery {
/** Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. */
data: string;
}
export interface GameShortGameCallbackQuery extends AbstractCallbackQuery {
/** Short name of a Game to be returned, serves as the unique identifier for the game */
game_short_name: string;
}
}
/** This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters). */
export type CallbackQuery = Merge<
CallbackQuery.DataCallbackQuery | CallbackQuery.GameShortGameCallbackQuery
>;
NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters). */
export interface CallbackQuery {
/** Unique identifier for this query */
id: string;
/** Sender */
from: User;
/** Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old */
message?: Message;
/** Identifier of the message sent via the bot in inline mode, that originated the query. */
inline_message_id?: string;
/** Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. */
chat_instance: string;
/** Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. */
data?: string;
/** Short name of a Game to be returned, serves as the unique identifier for the game */
game_short_name?: string;
}

@@ -93,0 +82,0 @@ /** Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.

@@ -1,2 +0,1 @@

import { Merge } from "./merge";
import { Location, Message, PhotoSize } from "./message";

@@ -155,13 +154,14 @@ import { Update } from "./update";

/** This object represents a chat. */
export type Chat = Merge<
Chat.PrivateChat | Chat.GroupChat | Chat.SupergroupChat | Chat.ChannelChat
>;
export type Chat =
| Chat.PrivateChat
| Chat.GroupChat
| Chat.SupergroupChat
| Chat.ChannelChat;
/** This object represents a Telegram user or bot that was returned by `getChat`. */
export type ChatFromGetChat = Merge<
export type ChatFromGetChat =
| Chat.PrivateGetChat
| Chat.GroupGetChat
| Chat.SupergroupGetChat
| Chat.ChannelGetChat
>;
| Chat.ChannelGetChat;

@@ -168,0 +168,0 @@ /** This object represent a user's profile pictures. */

import { InlineKeyboardMarkup } from "./inline";
import { Chat, User } from "./manage";
import { Merge } from "./merge";
import { PassportData } from "./passport";
import { Invoice, SuccessfulPayment } from "./payment";
// used to make properties required
type Value = string | number | boolean | object;
export namespace Message {

@@ -44,8 +46,2 @@ interface ServiceMessage {

}
export interface TextMessage extends CommonMessage {
/** For text messages, the actual UTF-8 text of the message, 0-4096 characters */
text: string;
/** For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */
entities?: MessageEntity[];
}
export interface CaptionableMessage extends CommonMessage {

@@ -61,189 +57,146 @@ /** Caption for the animation, audio, document, photo, video or voice, 0-1024 characters */

}
export interface AudioMessage extends CaptionableMessage {
/** Message is an audio file, information about the file */
audio: Audio;
}
export interface DocumentMessage extends CaptionableMessage {
/** Message is a general file, information about the file */
document: Document;
}
export interface AnimationMessage extends DocumentMessage {
/** Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set */
animation: Animation;
}
export interface PhotoMessage extends MediaMessage {
/** Message is a photo, available sizes of the photo */
photo: PhotoSize[];
}
export interface StickerMessage extends CommonMessage {
/** Message is a sticker, information about the sticker */
sticker: Sticker;
}
export interface VideoMessage extends MediaMessage {
/** Message is a video, information about the video */
video: Video;
}
export interface VideoNoteMessage extends CommonMessage {
/** Message is a video note, information about the video message */
video_note: VideoNote;
}
export interface VoiceMessage extends CaptionableMessage {
/** Message is a voice message, information about the file */
voice: Voice;
}
export interface ContactMessage extends CommonMessage {
/** Message is a shared contact, information about the contact */
contact: Contact;
}
export interface DiceMessage extends CommonMessage {
/** Message is a dice with random value */
dice: Dice;
}
export interface GameMessage extends CommonMessage {
/** Message is a game, information about the game. More about games » */
game: Game;
}
export interface PollMessage extends CommonMessage {
/** Message is a native poll, information about the poll */
poll: Poll;
}
export interface LocationMessage extends CommonMessage {
/** Message is a shared location, information about the location */
location: Location;
}
export interface VenueMessage extends LocationMessage {
/** Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set */
venue: Venue;
}
export interface NewChatMembersMessage extends ServiceMessage {
/** New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */
new_chat_members: User[];
}
export interface LeftChatMemberMessage extends ServiceMessage {
/** A member was removed from the group, information about them (this member may be the bot itself) */
left_chat_member: User;
}
export interface NewChatTitleMessage extends ServiceMessage {
/** A chat title was changed to this value */
new_chat_title: string;
}
export interface NewChatPhotoMessage extends ServiceMessage {
/** A chat photo was change to this value */
new_chat_photo: PhotoSize[];
}
export interface DeleteChatPhotoMessage extends ServiceMessage {
/** Service message: the chat photo was deleted */
delete_chat_photo: true;
}
export interface GroupChatCreatedMessage extends ServiceMessage {
/** Service message: the group has been created */
group_chat_created: true;
}
export interface SupergroupChatCreated extends ServiceMessage {
/** Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup. */
supergroup_chat_created: true;
}
export interface ChannelChatCreatedMessage extends ServiceMessage {
/** Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel. */
channel_chat_created: true;
}
export interface MessageAutoDeleteTimerChangedMessage extends ServiceMessage {
/** Service message: auto-delete timer settings changed in the chat */
message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged;
}
export interface MigrateToChatIdMessage extends ServiceMessage {
/** The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
migrate_to_chat_id: number;
}
export interface MigrateFromChatIdMessage extends ServiceMessage {
/** The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
migrate_from_chat_id: number;
}
export interface PinnedMessageMessage extends ServiceMessage {
/** Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply. */
pinned_message: ReplyMessage;
}
export interface InvoiceMessage extends ServiceMessage {
/** Message is an invoice for a payment, information about the invoice. More about payments » */
invoice: Invoice;
}
export interface SuccessfulPaymentMessage extends ServiceMessage {
/** Message is a service message about a successful payment, information about the payment. More about payments » */
successful_payment: SuccessfulPayment;
}
export interface ConnectedWebsiteMessage extends ServiceMessage {
/** The domain name of the website on which the user has logged in. More about Telegram Login » */
connected_website: string;
}
export interface PassportDataMessage extends ServiceMessage {
/** Telegram Passport data */
passport_data: PassportData;
}
export interface ProximityAlertTriggeredMessage extends ServiceMessage {
/** Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. */
proximity_alert_triggered: ProximityAlertTriggered;
}
export interface VoiceChatStartedMessage extends ServiceMessage {
/** Service message: voice chat started */
voice_chat_started: VoiceChatStarted;
}
export interface VoiceChatEndedMessage extends ServiceMessage {
/** Service message: voice chat ended */
voice_chat_ended: VoiceChatEnded;
}
export interface VoiceChatParticipantsInvitedMessage extends ServiceMessage {
/** Service message: new participants invited to a voice chat */
voice_chat_participants_invited: VoiceChatParticipantsInvited;
}
export type TextMessage = CommonMessage & { text: Value };
export type AudioMessage = CaptionableMessage & { audio: Value };
export type DocumentMessage = CaptionableMessage & { document: Value };
export type AnimationMessage = DocumentMessage & { animation: Value };
export type PhotoMessage = MediaMessage & { photo: Value };
export type StickerMessage = CommonMessage & { sticker: Value };
export type VideoMessage = MediaMessage & { video: Value };
export type VideoNoteMessage = CommonMessage & { video_note: Value };
export type VoiceMessage = CaptionableMessage & { voice: Value };
export type ContactMessage = CommonMessage & { contact: Value };
export type DiceMessage = CommonMessage & { dice: Value };
export type GameMessage = CommonMessage & { game: Value };
export type PollMessage = CommonMessage & { poll: Value };
export type LocationMessage = CommonMessage & { location: Value };
export type VenueMessage = LocationMessage & { venue: Value };
export type NewChatMembersMessage = ServiceMessage & {
new_chat_members: Value;
};
export type LeftChatMemberMessage = ServiceMessage & {
left_chat_member: Value;
};
export type NewChatTitleMessage = ServiceMessage & { new_chat_title: Value };
export type NewChatPhotoMessage = ServiceMessage & { new_chat_photo: Value };
export type DeleteChatPhotoMessage = ServiceMessage & {
delete_chat_photo: Value;
};
export type GroupChatCreatedMessage = ServiceMessage & {
group_chat_created: Value;
};
export type SupergroupChatCreated = ServiceMessage & {
supergroup_chat_created: Value;
};
export type ChannelChatCreatedMessage = ServiceMessage & {
channel_chat_created: Value;
};
export type MessageAutoDeleteTimerChangedMessage = ServiceMessage & {
message_auto_delete_timer_changed: Value;
};
export type MigrateToChatIdMessage = ServiceMessage & {
migrate_to_chat_id: Value;
};
export type MigrateFromChatIdMessage = ServiceMessage & {
migrate_from_chat_id: Value;
};
export type PinnedMessageMessage = ServiceMessage & { pinned_message: Value };
export type InvoiceMessage = ServiceMessage & { invoice: Value };
export type SuccessfulPaymentMessage = ServiceMessage & {
successful_payment: Value;
};
export type ConnectedWebsiteMessage = ServiceMessage & {
connected_website: Value;
};
export type PassportDataMessage = ServiceMessage & { passport_data: Value };
export type ProximityAlertTriggeredMessage = ServiceMessage & {
proximity_alert_triggered: Value;
};
export type VoiceChatStartedMessage = ServiceMessage & {
voice_chat_started: Value;
};
export type VoiceChatEndedMessage = ServiceMessage & {
voice_chat_ended: Value;
};
export type VoiceChatParticipantsInvitedMessage = ServiceMessage & {
voice_chat_participants_invited: Value;
};
}
/** Helper type that bundles all possible `Message.ServiceMessage`s. More specifically, bundles all messages that do not have a `reply_to_message` field, i.e. are not a `Message.CommonMessage`. */
type ServiceMessageBundle =
| Message.ChannelChatCreatedMessage
| Message.ConnectedWebsiteMessage
| Message.DeleteChatPhotoMessage
| Message.GroupChatCreatedMessage
| Message.InvoiceMessage
| Message.LeftChatMemberMessage
| Message.MessageAutoDeleteTimerChangedMessage
| Message.MigrateFromChatIdMessage
| Message.MigrateToChatIdMessage
| Message.NewChatMembersMessage
| Message.NewChatPhotoMessage
| Message.NewChatTitleMessage
| Message.PassportDataMessage
| Message.PinnedMessageMessage
| Message.ProximityAlertTriggeredMessage
| Message.SuccessfulPaymentMessage
| Message.SupergroupChatCreated
| Message.VoiceChatStartedMessage
| Message.VoiceChatEndedMessage
| Message.VoiceChatParticipantsInvitedMessage;
type ReplyMessage = Message & { reply_to_message: undefined };
/** Helper type that bundles all possible `Message.CommonMessage`s. More specifically, bundles all messages that do have a `reply_to_message` field, i.e. are a `Message.CommonMessage`. */
type CommonMessageBundle =
| Message.AnimationMessage
| Message.AudioMessage
| Message.ContactMessage
| Message.DiceMessage
| Message.DocumentMessage
| Message.GameMessage
| Message.LocationMessage
| Message.PhotoMessage
| Message.PollMessage
| Message.StickerMessage
| Message.TextMessage
| Message.VenueMessage
| Message.VideoMessage
| Message.VideoNoteMessage
| Message.VoiceMessage;
export interface Message extends Message.MediaMessage {
/** For text messages, the actual UTF-8 text of the message, 0-4096 characters */
text?: string;
/** For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */
entities?: MessageEntity[];
/** Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set */
animation?: Animation;
/** Message is an audio file, information about the file */
audio?: Audio;
/** Message is a general file, information about the file */
document?: Document;
/** Message is a photo, available sizes of the photo */
photo?: PhotoSize[];
/** Message is a sticker, information about the sticker */
sticker?: Sticker;
/** Message is a video, information about the video */
video?: Video;
/** Message is a video note, information about the video message */
video_note?: VideoNote;
/** Message is a voice message, information about the file */
voice?: Voice;
/** Message is a shared contact, information about the contact */
contact?: Contact;
/** Message is a dice with random value */
dice?: Dice;
/** Message is a game, information about the game. More about games » */
game?: Game;
/** Message is a native poll, information about the poll */
poll?: Poll;
/** Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set */
venue?: Venue;
/** Message is a shared location, information about the location */
location?: Location;
/** New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */
new_chat_members?: User[];
/** A member was removed from the group, information about them (this member may be the bot itself) */
left_chat_member?: User;
/** A chat title was changed to this value */
new_chat_title?: string;
/** A chat photo was change to this value */
new_chat_photo?: PhotoSize[];
/** Service message: the chat photo was deleted */
delete_chat_photo?: true;
/** Service message: the group has been created */
group_chat_created?: true;
/** Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup. */
supergroup_chat_created?: true;
/** Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel. */
channel_chat_created?: true;
/** Service message: auto-delete timer settings changed in the chat */
message_auto_delete_timer_changed?: MessageAutoDeleteTimerChanged;
/** The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
migrate_to_chat_id?: number;
/** The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
migrate_from_chat_id?: number;
/** Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply. */
pinned_message?: ReplyMessage;
/** Message is an invoice for a payment, information about the invoice. More about payments » */
invoice?: Invoice;
/** Message is a service message about a successful payment, information about the payment. More about payments » */
successful_payment?: SuccessfulPayment;
/** The domain name of the website on which the user has logged in. More about Telegram Login » */
connected_website?: string;
/** Telegram Passport data */
passport_data?: PassportData;
/** Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. */
proximity_alert_triggered?: ProximityAlertTriggered;
/** Service message: voice chat started */
voice_chat_started?: VoiceChatStarted;
/** Service message: voice chat ended */
voice_chat_ended?: VoiceChatEnded;
/** Service message: new participants invited to a voice chat */
voice_chat_participants_invited?: VoiceChatParticipantsInvited;
}
/** Helper type that represents a message which occurs in a `reply_to_message` field. */
type ReplyMessage =
| ServiceMessageBundle
| (CommonMessageBundle & { reply_to_message: undefined });
/** This object represents a message. */
export type Message = Merge<ServiceMessageBundle | CommonMessageBundle>;
/** This object represents a unique message identifier. */

@@ -386,8 +339,7 @@ export interface MessageId {

/** This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. */
export type MessageEntity = Merge<
export type MessageEntity =
| MessageEntity.CommonMessageEntity
| MessageEntity.PreMessageEntity
| MessageEntity.TextLinkMessageEntity
| MessageEntity.TextMentionMessageEntity
>;
| MessageEntity.TextMentionMessageEntity;

@@ -590,24 +542,18 @@ /** This object represents one size of a photo or a file / sticker thumbnail. */

export namespace Location {
export interface CommonLocation {
/** Longitude as defined by sender */
longitude: number;
/** Latitude as defined by sender */
latitude: number;
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
horizontal_accuracy?: number;
}
export interface LiveLocation extends CommonLocation {
/** Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only. */
live_period: number;
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
heading: number;
/** Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */
proximity_alert_radius?: number;
}
/** This object represents a point on the map. */
export interface Location {
/** Longitude as defined by sender */
longitude: number;
/** Latitude as defined by sender */
latitude: number;
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
horizontal_accuracy?: number;
/** Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only. */
live_period?: number;
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
heading?: number;
/** Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */
proximity_alert_radius?: number;
}
/** This object represents a point on the map. */
export type Location = Merge<Location.CommonLocation | Location.LiveLocation>;
/** This object represents a venue. */

@@ -614,0 +560,0 @@ export interface Venue {

{
"name": "@grammyjs/types",
"version": "2.0.1",
"version": "2.0.2",
"description": "Telegram Bot API type declarations for grammY",

@@ -5,0 +5,0 @@ "main": "index.js",

import { CallbackQuery } from "./callback";
import { ChosenInlineResult, InlineQuery } from "./inline";
import { Chat, ChatMemberUpdated, User } from "./manage";
import { Merge } from "./merge";
import { Message, Poll, PollAnswer } from "./message";
import { PreCheckoutQuery, ShippingQuery } from "./payment";
/** Internal namespace used to make some message types more accurate */
export namespace Update {

@@ -36,75 +36,35 @@ /** Internal type holding properties that updates in channels share. */

}
}
export interface AbstractUpdate {
/** The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. */
update_id: number;
}
export interface MessageUpdate extends AbstractUpdate {
/** New incoming message of any kind — text, photo, sticker, etc. */
message: Message & New & NonChannel;
}
export interface EditedMessageUpdate extends AbstractUpdate {
/** New version of a message that is known to the bot and was edited */
edited_message: Message & Edited & NonChannel;
}
export interface ChannelPostUpdate extends AbstractUpdate {
/** New incoming channel post of any kind — text, photo, sticker, etc. */
channel_post: Message & New & Channel;
}
export interface EditedChannelPostUpdate extends AbstractUpdate {
/** New version of a channel post that is known to the bot and was edited */
edited_channel_post: Message & Edited & Channel;
}
export interface InlineQueryUpdate extends AbstractUpdate {
/** New incoming inline query */
inline_query: InlineQuery;
}
export interface ChosenInlineResultUpdate extends AbstractUpdate {
/** The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot. */
chosen_inline_result: ChosenInlineResult;
}
export interface CallbackQueryUpdate extends AbstractUpdate {
/** New incoming callback query */
callback_query: CallbackQuery;
}
export interface ShippingQueryUpdate extends AbstractUpdate {
/** New incoming shipping query. Only for invoices with flexible price */
shipping_query: ShippingQuery;
}
export interface PreCheckoutQueryUpdate extends AbstractUpdate {
/** New incoming pre-checkout query. Contains full information about checkout */
pre_checkout_query: PreCheckoutQuery;
}
export interface PollUpdate extends AbstractUpdate {
/** New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot */
poll: Poll;
}
export interface PollAnswerUpdate extends AbstractUpdate {
/** A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself. */
poll_answer: PollAnswer;
}
export interface MyChatMemberUpdate extends AbstractUpdate {
/** The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user. */
my_chat_member: ChatMemberUpdated;
}
export interface ChatMemberUpdate extends AbstractUpdate {
/** A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates. */
chat_member: ChatMemberUpdated;
}
/** This object represents an incoming update.
At most one of the optional parameters can be present in any given update. */
export interface Update {
/** The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. */
update_id: number;
/** New incoming message of any kind — text, photo, sticker, etc. */
message?: Message;
/** New version of a message that is known to the bot and was edited */
edited_message?: Message;
/** New incoming channel post of any kind — text, photo, sticker, etc. */
channel_post?: Message;
/** New version of a channel post that is known to the bot and was edited */
edited_channel_post?: Message;
/** New incoming inline query */
inline_query?: InlineQuery;
/** The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot. */
chosen_inline_result?: ChosenInlineResult;
/** New incoming callback query */
callback_query?: CallbackQuery;
/** New incoming shipping query. Only for invoices with flexible price */
shipping_query?: ShippingQuery;
/** New incoming pre-checkout query. Contains full information about checkout */
pre_checkout_query?: PreCheckoutQuery;
/** New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot */
poll?: Poll;
/** A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself. */
poll_answer?: PollAnswer;
/** The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user. */
my_chat_member?: ChatMemberUpdated;
/** A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates. */
chat_member?: ChatMemberUpdated;
}
export type Update = Merge<
| Update.CallbackQueryUpdate
| Update.ChannelPostUpdate
| Update.ChatMemberUpdate
| Update.ChosenInlineResultUpdate
| Update.EditedChannelPostUpdate
| Update.EditedMessageUpdate
| Update.InlineQueryUpdate
| Update.MessageUpdate
| Update.MyChatMemberUpdate
| Update.PreCheckoutQueryUpdate
| Update.PollAnswerUpdate
| Update.PollUpdate
| Update.ShippingQueryUpdate
>;

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc