grammY is a framework for creating Telegram bots. It can be used from TypeScript and JavaScript and runs on both Deno and Node.js.
grammY by example is a collection of annotated examples to help beginners get started with grammY, know about its various features and plugins available for it. If you're looking for a well-explained and complete guide, see the documentation.
Hello World
Make your bot say Hello, World!
Echo Bot
Echo the user.
Commands
Create and assign actions to commands.
Message Formatting
Format bot's text messages using parse modes.
Filter Queries
Filtering the incoming updates.
Bots can be written in either JavaScript or TypeScript. All code in these examples is written in TypeScript, but all the examples also work in JavaScript.
As mentioned, grammY is powerful enough to run on Deno, Node and browser. All these example are written for the Deno runtime. But by changing the imports here and there, these can easily run on Node.js as well.
!--frsh-bottokeninput:0-->If you provide a bot token, you will be able to run the examples directly from your browser. You can get one by talking to @BotFather.
Source | License | Based on Deno by Example