Skip to content

Commit

Permalink
chore: update README and bump
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed May 15, 2024
1 parent 21bf1fe commit d3de98d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
42 changes: 31 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,46 @@
# GramIO

<div align="center">

[![Bot API](https://img.shields.io/badge/Bot%20API-7.3-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)
[![npm](https://img.shields.io/npm/v/gramio?logo=npm&style=flat&labelColor=000&color=3b82f6)](https://www.npmjs.org/package/@gramio/core)
[![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)

</div>

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/)\*

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

Currently support Bot API 7.3
**Deno\*** [windows-specific issue with undici](https://github.com/denoland/deno/issues/19532)

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

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

```ts
```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("") // put you token here
.command("start", (context) => context.send("Hi!"))
.onError(console.error)
.onStart(console.log);
const bot = new Bot()
.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).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gramio",
"version": "0.0.32",
"version": "0.0.33",
"description": "Powerful Telegram Bot API framework",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit d3de98d

Please sign in to comment.