Skip to content

Spizhen/tg-web-bot-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Web Bots Demo

Simple working example of Telegram Web Apps.

image

Setup

  • Create .env file with your bot token.
  • Run npm install
  • Change APP_BASE_URL inside index.js to your domain.
  • Run npm start

Usage

This demo simulates @asmico_attach_bot backend. Since this is a basic example, bot will only respond to /demo or /simple commands every 3 seconds. If you're working on implementing Web Apps to your bot, your library probably already updated and provides better interfaces for the Telegram Bot API.

This demo was done in 1 hour and is not meant to be running in a production environment. Tip: Use localtunnel or ngrok to make local setup available to the Internet.

Thanks

@asmico for @asmico_attach_bot demo. Parts of https://webappcontent.telegram.org/demo were used in this repo

About

Demo for Telegram Web Bots

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 84.5%
  • JavaScript 15.3%
  • Shell 0.2%