pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/agiletech-web-dev/telegram-sdk

origen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-8522af645b000615.css" /> GitHub - agiletech-web-dev/telegram-sdk: This repository offers an npm package for developing web applications for your Telegram bot. · GitHub
Skip to content

agiletech-web-dev/telegram-sdk

 
 

Repository files navigation

logo

This repository offers an npm package for developing web applications for your Telegram bot. It re-exports the API provided by Telegram's JS module. The benefit of this package is that it includes TypeScript types, simplifying project setup.

NPM Version NPM Downloads Minizip Contributors License

Installation

pnpm add telegram-sdk

you don't need to install the Telegram JS module separately, as it is included in this package.

Setup

  • Import core module in root file of your project.
import 'telegram-sdk/core';

Usage

  • Use the API provided by the Telegram JS module.
import { WebApp, WebView } from 'telegram-sdk';

// to display the initData
console.log(WebApp.initData);

// to show the main button
WebApp.MainButton.show();

// to set the app background color
WebApp.setBackgroundColor('#f60000')

// to set the app header color
WebApp.setHeaderColor('bg_color');

// Display a swipe vertical by event
WebView.postEvent('web_app_setup_swipe_behavior', false, {
  allow_vertical_swipe: false,
});

// ready method must come last
WebApp.ready();

disableVerticalSwipes

import { WebApp, WebView } from 'telegram-sdk';

// Config something...
WebApp.expand(); // Expand app
WebApp.disableClosingConfirmation();
WebApp.disableVerticalSwipes(); // Disable Vertical Swiper

// ready method must come last
WebApp.ready();

Documentation

About

This repository offers an npm package for developing web applications for your Telegram bot.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 83.0%
  • TypeScript 17.0%
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy