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

telegraf

Package Overview
Dependencies
Maintainers
3
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

telegraf - npm Package Compare versions

Comparing version 4.8.0-canary.5 to 4.8.0

18

lib/context.js

@@ -92,2 +92,20 @@ "use strict";

}
get webAppData() {
if (!('message' in this.update &&
this.update.message &&
'web_app_data' in this.update.message))
return undefined;
const { data, button_text } = this.update.message.web_app_data;
return {
data: {
json() {
return JSON.parse(data);
},
text() {
return data;
},
},
button_text,
};
}
/**

@@ -94,0 +112,0 @@ * @deprecated use {@link Telegram.webhookReply}

2

package.json
{
"name": "telegraf",
"version": "4.8.0-canary.5",
"version": "4.8.0",
"description": "Modern Telegram Bot Framework",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -7,3 +7,3 @@ <header>

[![Bot API Version](https://img.shields.io/badge/Bot%20API-v5.7-f36caf.svg?style=flat-square)](https://core.telegram.org/bots/api)
[![Bot API Version](https://img.shields.io/badge/Bot%20API-v6.0-f36caf.svg?style=flat-square)](https://core.telegram.org/bots/api)
[![install size](https://flat.badgen.net/packagephobia/install/telegraf)](https://packagephobia.com/result?p=telegraf,node-telegram-bot-api)

@@ -31,3 +31,3 @@ [![GitHub top language](https://img.shields.io/github/languages/top/telegraf/telegraf?style=flat-square&logo=github)](https://github.com/telegraf/telegraf)

- Full [Telegram Bot API 5.7](https://core.telegram.org/bots/api) support
- Full [Telegram Bot API 6.0](https://core.telegram.org/bots/api) support
- [Excellent TypeScript typings](https://github.com/telegraf/telegraf/releases/tag/v4.0.0)

@@ -34,0 +34,0 @@ - [Lightweight](https://packagephobia.com/result?p=telegraf,node-telegram-bot-api)

@@ -139,2 +139,27 @@ import * as tg from './core/types/typegram'

get webAppData() {
if (
!(
'message' in this.update &&
this.update.message &&
'web_app_data' in this.update.message
)
)
return undefined
const { data, button_text } = this.update.message.web_app_data
return {
data: {
json<T>() {
return JSON.parse(data) as T
},
text() {
return data
},
},
button_text,
}
}
/**

@@ -141,0 +166,0 @@ * @deprecated use {@link Telegram.webhookReply}

@@ -36,2 +36,9 @@ import * as tg from './core/types/typegram';

get passportData(): tg.PassportData | undefined;
get webAppData(): {
data: {
json<T>(): T;
text(): string;
};
button_text: string;
} | undefined;
/**

@@ -74,3 +81,3 @@ * @deprecated use {@link Telegram.webhookReply}

*/
editMessageMedia(this: Context, media: tg.InputMedia, extra?: tt.ExtraEditMessageMedia): Promise<true | (tg.Update.Edited & tg.Message.AnimationMessage) | (tg.Update.Edited & tg.Message.AudioMessage) | (tg.Update.Edited & tg.Message.DocumentMessage) | (tg.Update.Edited & tg.Message.PhotoMessage) | (tg.Update.Edited & tg.Message.VideoMessage)>;
editMessageMedia(this: Context, media: tg.InputMedia, extra?: tt.ExtraEditMessageMedia): Promise<true | (tg.Update.Edited & tg.Message.AnimationMessage) | (tg.Update.Edited & tg.Message.DocumentMessage) | (tg.Update.Edited & tg.Message.AudioMessage) | (tg.Update.Edited & tg.Message.PhotoMessage) | (tg.Update.Edited & tg.Message.VideoMessage)>;
/**

@@ -77,0 +84,0 @@ * @see https://core.telegram.org/bots/api#editmessagereplymarkup

@@ -297,3 +297,3 @@ /// <reference types="node" />

*/
editMessageMedia(chatId: number | string | undefined, messageId: number | undefined, inlineMessageId: string | undefined, media: tg.InputMedia, extra?: tt.ExtraEditMessageMedia): Promise<true | (tg.Update.Edited & tg.Message.AnimationMessage) | (tg.Update.Edited & tg.Message.AudioMessage) | (tg.Update.Edited & tg.Message.DocumentMessage) | (tg.Update.Edited & tg.Message.PhotoMessage) | (tg.Update.Edited & tg.Message.VideoMessage)>;
editMessageMedia(chatId: number | string | undefined, messageId: number | undefined, inlineMessageId: string | undefined, media: tg.InputMedia, extra?: tt.ExtraEditMessageMedia): Promise<true | (tg.Update.Edited & tg.Message.AnimationMessage) | (tg.Update.Edited & tg.Message.DocumentMessage) | (tg.Update.Edited & tg.Message.AudioMessage) | (tg.Update.Edited & tg.Message.PhotoMessage) | (tg.Update.Edited & tg.Message.VideoMessage)>;
/**

@@ -300,0 +300,0 @@ * Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).

Sorry, the diff of this file is not supported yet

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