GithubHelp home page GithubHelp logo

avert / grammy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grammyjs/grammy

0.0 0.0 0.0 453 KB

The Telegram Bot Framework.

Home Page: https://grammy.dev

License: MIT License

TypeScript 99.71% Shell 0.29%

grammy's Introduction

grammY

The Telegram Bot Framework.


πŸ” Documentation | πŸ“ƒ API Reference | πŸ‘₯ Group Chat | πŸ†• News

Bot API npm All Contributors

grammY makes it easy to create Telegram bots. Both for beginners and at scale.

You want grammY because it is easy to use. It is very powerful and always up to date. It has the best documentation in town. It is extremely efficient and scales up effortlessly. It has a thriving ecosystem of plugins, a friendly community chat, seamless integrations with web frameworks and databases, and so much more.

Are you ready? πŸ€–πŸš€

Bots are written in TypeScript (or JavaScript) and run on Node.js.

Quickstart

If you are new to Telegram bots, read the official Introduction for Developers written by the Telegram team.

Visit @BotFather and create a new bot. You will obtain a bot token.

Create a new directory and run

npm install grammy

inside it. Then create a file bot.js with this content:

const { Bot } = require("grammy");

// Create a bot object
const bot = new Bot(""); // <-- place your bot token in this string

// Register listeners to handle messages
bot.on("message:text", (ctx) => ctx.reply("Echo: " + ctx.message.text));

// Start the bot (using long polling)
bot.start();

Now you can run the bot via

node bot.js

and it will echo all received text messages.

Congrats! You just wrote a Telegram bot :)

Going Further

grammY has an excellent documentation, and an API Reference. It even integrates with your code editor, e.g. VSCode. You can hover over any element of grammY to get a detailed description of what that thing does or means.

If you are still stuck, just join the Telegram chat and ask for help. People are nice there and we appreciate your question, no matter what it is :)

Here are some more resources to support you:

Resources

grammY Website

β€”main project website and documentation.

grammY API Reference

β€”reference of everything that grammY exports.

grammY Example Bots

β€”repository full of example bots. Includes a setup to easily run any of them.

grammY Telegram Chat

β€”Telegram chat where you can ask any question about grammY or bots in general. We are also open for feedback, ideas, and contributions!

The Russian commnity chat can be found here.

grammY News Channel

β€”Telegram channel where updates to grammY and the ecosystem are posted.

Telegram Bot API Reference

β€”documentation of the API that Telegram offers, and that grammY connects to under the hood.

Deno Support

All grammY packages published by @grammyjs run natively on Deno. We are compiling every codebase to still run on Node.

However, given that most bot developers are still using Node, all documentation is written Node-first. We may migrate it if Deno overtakes Node. If you are already on Deno today, we expect you to know what you're doing. You mainly have to adjust the imports to URL imports, and import from https://deno.land/x/grammy/mod.ts.

Contribution Guide Β»

Contributors ✨

Thanks goes to these wonderful people (emoji key):


KnorpelSenf

πŸ€” πŸ’» πŸ“– 🎨 πŸ’‘ πŸ’¬ ⚠️ πŸ”Œ πŸ“¦ πŸ‘€ πŸ§‘β€πŸ«

Tecardo1

πŸ”Œ πŸ““

Wojciech Pawlik

πŸ€” πŸ‘€ πŸš‡ πŸ“¦

Alessandro Bertozzi

πŸ“–

trgwii

πŸ’» πŸ‘€

KnightNiwrem

πŸ’» πŸ› πŸ”Œ πŸ“– πŸ’‘ πŸ‘€ πŸ§‘β€πŸ«

Muthu Kumar

πŸ‘€

EdJoPaTo

πŸ”Œ πŸ“– πŸ€” πŸ‘€ πŸ› πŸ’» πŸ’¬

Amir Zouerami

πŸ“– πŸ”Œ

Roj

πŸ“– πŸ‘€ πŸš‡ 🌍 πŸ’»

jokasimr

πŸ›

Ciki Momogi

πŸ“–

AndreoliBR

πŸ‘€

Kirill Loskutov

πŸ“– πŸ› πŸ€”

Andrew Lane

πŸ› πŸ‘€

code-withAshish

πŸ“–

Stephane Mensah

πŸ› πŸ”Œ

Asaku01

πŸ“–

ppsimn

πŸ›

Satont

πŸ”Œ

deptyped

πŸ’‘ πŸ“– βœ… πŸ’¬

Jacek Nowacki

πŸ“– πŸ’» πŸ› πŸ‘€ πŸ€”

Outvi V

πŸ’»

Ikko Ashimine

πŸ“–

Yevhen Denesiuk

πŸ‘€ πŸ› πŸ’»

prastian

πŸ› πŸ’»

Sayem Chowdhury

πŸ€”

kospra

πŸ€” πŸ’»

Chimit

πŸ“–

Calsi

πŸ“–

Jonas Zohren

πŸ› πŸ’»

linbuxiao

πŸ“– 🌍

JiquanWang99

πŸ“– 🌍

Borhan Hafez

πŸ”Œ

WingLim

πŸ“– 🌍

taotie111

πŸ“– 🌍

Merlin

πŸ“–

Darvesh

πŸ› πŸ’»

dcdunkan

πŸ› πŸ’»

Kid

πŸ“– 🌍

Slava Fomin II

πŸ› πŸ“–

Kiko Beats

πŸ“–

Vsevolod

πŸ’» πŸ€” πŸ‘€

Habemuscode

πŸ‘€

This project follows the all-contributors specification. Contributions of any kind welcome!

grammy's People

Contributors

allcontributors[bot] avatar darvesh avatar dcdunkan avatar dzek69 avatar edjopato avatar eltociear avatar habemuscode avatar jfowl avatar knightniwrem avatar knorpelsenf avatar kospra avatar kraftwerk28 avatar outloudvi avatar roj1512 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.