Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gramiojs/gramio

Powerful, extensible and really type-safe Telegram Bot API framework
https://github.com/gramiojs/gramio

bun framework nodejs telegram telegram-api telegram-bot telegram-bot-api telegram-framework typescript

Last synced: 2 months ago
JSON representation

Powerful, extensible and really type-safe Telegram Bot API framework

Awesome Lists containing this project

README

        

# GramIO

[![Bot API](https://img.shields.io/badge/Bot%20API-7.10-blue?logo=telegram&style=flat&labelColor=000&color=3b82f6)](https://core.telegram.org/bots/api)
[![npm](https://img.shields.io/npm/v/gramio?logo=npm&style=flat&labelColor=000&color=3b82f6)](https://www.npmjs.org/package/gramio)
[![JSR](https://jsr.io/badges/@gramio/core)](https://jsr.io/@gramio/core)
[![JSR Score](https://jsr.io/badges/@gramio/core/score)](https://jsr.io/@gramio/core)

TypeScript/JavaScript Telegram Bot API Framework for create your bots with convenience!

✨ **Extensible** - Our plugin and hook system is awesome

🛡️ **Type-safe** - Written in TypeScript with love ❤️

🌐 **Multi-runtime** - Works on [Node.js](https://nodejs.org/), [Bun](https://bun.sh/) and [Deno](https://deno.com/)

⚙️ **Code-generated** - Many parts are code-generated (for example, [code-generated and auto-published Telegram Bot API types](https://github.com/gramiojs/types))

## [Get started](https://gramio.dev/get-started)

To create your new bot, you just need to write it to the console:

```bash [npm]
npm create gramio ./bot
```

and GramIO customize your project the way you want it!

### Example

```typescript
import { Bot } from "gramio";

const bot = new Bot(process.env.TOKEN as string)
.command("start", (context) => context.send("Hello!"))
.onStart(({ info }) => console.log(`✨ Bot ${info.username} was started!`));

bot.start();
```

For more, please see [documentation](https://gramio.dev).