Skip to content

Functional Telegram bot, Validating data received via the Mini App. Don't come.

License

Notifications You must be signed in to change notification settings

Lakylife/telegram_mini_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOWNLOAD: https://github.com/Lakylife AUTHOR: LAKYLIFE

Telegram Bot mini app version 1.0

Description

This project contains a basic template for creating a Telegram bot for the PizzaPenny meme game application. The Telegram bot allows users to communicate with the application and obtain information or perform actions through Telegram.

Getting Started

Requirements

  • Node.js
  • NPM or Yarn
  • Valid Telegram account to create a bot
  • Valid token for the Telegram Bot API

Installation

  1. Clone this repository:
  2. Navigate to the project directory:
  3. Install dependencies using NPM or Yarn
  4. npm init -y
  5. npm install

Configuration

  1. Create a .env file: Create a .env file in the project directory and set the following environment variables:
  • TELEGRAM_BOT_TOKEN: Your valid token for the Telegram Bot API.
  • WEBHOOK_URL: The URL where your bot's webhook will be set.
  • PORT: The port on which your server will run.
  1. Register your bot with BotFather:

Register your bot with BotFather and obtain your token.

  1. Set WEBHOOK_URL: https://api.examples.com

Set WEBHOOK_URL to a publicly accessible URL for your server.

Running

  1. Start the server: node telegrambot.js or pm2 start telegrambot.js --name "TELEGRAM BOT MINI APP"
  2. Interact with the bot

Connect your bot on Telegram using its username or the bot's page link. Start interacting with the bot using various commands, such as /start or other custom commands implemented in your code.

Vite React native

  1. npm install vite@latest nameApp
  2. npm install @twa-dev/sdk
  3. Interact with the bot

License

This project is licensed under the MIT License.