Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@telegraf/types

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@telegraf/types - npm Package Compare versions

Comparing version 6.7.0 to 6.8.0

10

manage.d.ts

@@ -13,11 +13,11 @@ import type { Location, Message, PhotoSize } from "./message.js";

/** Unix time for the most recent error that happened when trying to deliver an update via webhook */
last_error_date: number;
last_error_date?: number;
/** Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook */
last_error_message: string;
last_error_message?: string;
/** Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters */
last_synchronization_error_date?: number;
/** The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery */
max_connections: number;
max_connections?: number;
/** A list of update types the bot is subscribed to. Defaults to all update types except chat_member */
allowed_updates: string[];
allowed_updates?: string[];
}

@@ -133,2 +133,4 @@ /** This object represents a Telegram user or bot. */

emoji_status_custom_emoji_id?: string;
/** Expiration date of the emoji status of the other party in a private chat, if any. Returned only in getChat. */
emoji_status_expiration_date?: number;
/** Bio of the other party in a private chat. Returned only in getChat. */

@@ -135,0 +137,0 @@ bio?: string;

4

markup.d.ts

@@ -30,5 +30,3 @@ import type { ChatAdministratorRights, User } from "./manage.js";

interface SwitchInlineButton extends AbstractInlineKeyboardButton {
/** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted.
Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm... actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. */
/** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted. */
switch_inline_query: string;

@@ -35,0 +33,0 @@ }

@@ -88,2 +88,6 @@ import type { Chat, File, User } from "./manage.js";

}
interface StoryMessage extends CommonMessage {
/** Message is a forwarded story. Currently holds no information */
story: Story;
}
interface VideoMessage extends MediaMessage {

@@ -253,3 +257,3 @@ /** Message is a video, information about the video */

/** 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`. */
export 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 type CommonMessageBundle = Message.AnimationMessage | Message.AudioMessage | Message.ContactMessage | Message.DiceMessage | Message.DocumentMessage | Message.GameMessage | Message.LocationMessage | Message.PhotoMessage | Message.PollMessage | Message.StickerMessage | Message.StoryMessage | Message.TextMessage | Message.VenueMessage | Message.VideoMessage | Message.VideoNoteMessage | Message.VoiceMessage;
/** Helper type that represents a message which occurs in a `reply_to_message` field. */

@@ -310,7 +314,7 @@ type ReplyMessage = ServiceMessageBundle | (CommonMessageBundle & {

- Inside `pre` and `code` entities, all '`' and '\' characters must be escaped with a preceding '\' character.
- Inside `(...)` part of inline link definition, all ')' and '\' must be escaped with a preceding '\' character.
- Inside the `(...)` part of the inline link and custom emoji definition, all ')' and '\' must be escaped with a preceding '\' character.
- In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\'.
- In case of ambiguity between `italic` and `underline` entities `__` is always greadily treated from left to right as beginning or end of `underline` entity, so instead of `___italic underline___` use `___italic underline_\r__`, where `\r` is a character with code 13, which will be ignored.
- A valid emoji must be provided as an alternative value for the custom emoji. The emoji will be shown instead of the custom emoji in places where a custom emoji cannot be displayed (e.g., system notifications) or if the message is forwarded by a non-premium user. It is recommended to use the emoji from the emoji field of the custom emoji sticker.
- Custom emoji entities can only be used by bots that purchased additional usernames on Fragment.
- In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\'.
- In case of ambiguity between `italic` and `underline` entities `__` is always greadily treated from left to right as beginning or end of `underline` entity, so instead of `___italic underline___` use `___italic underline_\r__`, where `\r` is a character with code 13, which will be ignored.

@@ -553,4 +557,9 @@ #### HTML style

poll_id: string;
/** The user, who changed the answer to the poll */
user: User;
/** The chat that changed the answer to the poll, if the voter is anonymous */
voter_chat?: Chat;
/** The user, who changed the answer to the poll, if the voter isn't anonymous
*
* For backward compatibility, the field user will contain the user 136817688 (@Channel_Bot) if the voter was a chat
*/
user?: User;
/** 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote. */

@@ -625,2 +634,5 @@ option_ids: number[];

}
/** This object represents a message about a forwarded story in the chat. Currently holds no information. */
export interface Story {
}
/** This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. */

@@ -627,0 +639,0 @@ export interface ProximityAlertTriggered {

{
"name": "@telegraf/types",
"private": false,
"version": "6.7.0",
"version": "6.8.0",
"description": "Type declarations for the Telegram API",

@@ -6,0 +6,0 @@ "main": "mod.js",

# Types for the Telegram Bot API [![Deno shield](https://img.shields.io/static/v1?label=Built%20for&message=Deno&style=flat-square&logo=deno&labelColor=000&color=fff)](https://deno.land/x/telegraf_types)
[![Bot API Version](https://img.shields.io/badge/Bot%20API-v6.7-f36caf.svg?style=flat-square&logo=Telegram&labelColor=white&color=blue)](https://core.telegram.org/bots/api) [![NPM version](https://img.shields.io/npm/v/@telegraf/types?style=flat-square&logo=npm&labelColor=fff&color=c53635)](https://npmjs.com/package/@telegraf/types)
[![Bot API Version](https://img.shields.io/badge/Bot%20API-v6.8-f36caf.svg?style=flat-square&logo=Telegram&labelColor=white&color=blue)](https://core.telegram.org/bots/api) [![NPM version](https://img.shields.io/npm/v/@telegraf/types?style=flat-square&logo=npm&labelColor=fff&color=c53635)](https://npmjs.com/package/@telegraf/types)

@@ -5,0 +5,0 @@ This project is a fork of [@KnorpelSenf/typegram](https://github.com/KnorpelSenf/typegram), specialised for Telegraf. Typegram is legacy, and now backported from [@grammyjs/types](https://github.com/grammyjs/types).

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