Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/gramiojs/gramio
- Owner: gramiojs
- License: mit
- Created: 2023-11-02T16:42:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-16T15:39:06.000Z (4 months ago)
- Last Synced: 2024-09-16T18:45:05.430Z (4 months ago)
- Topics: bun, framework, nodejs, telegram, telegram-api, telegram-bot, telegram-bot-api, telegram-framework, typescript
- Language: TypeScript
- Homepage: https://gramio.dev/
- Size: 342 KB
- Stars: 36
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - gramiojs/gramio - Powerful, extensible and really type-safe Telegram Bot API framework (TypeScript)
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).