Git Product home page Git Product logo

grammyvercel's Introduction

Telegram Bot Template for Vercel Serverless Functions

๐Ÿ“– Documentation for grammY

What does this template do for you

1. Instant prototyping

Just click the blue button and change something in src/bot.mjs in newly minted repository

2. Universal bootstrap

Use webhooks or long polling locally, even without a Vercel project or CLI

3. Ready for production

Webhooks will be automatically installed for every deployment on Vercel during the build step

How to Use

You can choose from one of the following two methods to use this repository:

One-Click Deploy

Deploy the template using Vercel:

Deploy with Vercel

Clone and Deploy

Select the appropriate option and deploy it to the cloud with Vercel

As Vercel project

Please note that you will need to create a Vercel project and set the bot token in the settings

Using long polling
npm run polling
Using webhooks with CloudFlare tunnel (cloudflared) :
npm run webhook

And open link from terminal (ends with *.trycloudflare.com) to set webhooks URL

If you want another tunnel, just use vercel dev

As local project

Set environment variable or create .env file:

TELEGRAM_BOT_TOKEN="Telegram Bot Token from t.me/BotFather"

Run in long polling mode:

npm run start

๐Ÿ’ก This command does not require a Vercel account or CLI installation to run

Environment variables

  • TELEGRAM_BOT_TOKEN โ€” Telegram bot token from @BotFather
  • TELEGRAM_SECRET_TOKEN โ€” Secret token for incoming requests

Template structure

Related templates

Made with ๐Ÿ’œ by Vladislav Ponomarev

grammyvercel's People

Contributors

dependabot[bot] avatar ponomarevlad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.