Skip to content

Commit 1557f4a

Browse files
committed
chore: bump
1 parent 92ea276 commit 1557f4a

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,25 @@ Library for easily manage callback-data.
88

99
WIP. JSON.stringify is temporarily used under the hood.
1010

11+
## Usage with [GramIO](https://gramio.netlify.app/)
12+
13+
```typescript
14+
const someData = new CallbackData("example").number("id");
15+
16+
new Bot()
17+
.command("start", (context) =>
18+
context.send("some", {
19+
reply_markup: new InlineKeyboard().text(
20+
"example",
21+
someData.pack({
22+
id: 1,
23+
})
24+
),
25+
})
26+
)
27+
.callbackQuery(someData, (context) => {
28+
context.queryData; // is type-safe
29+
});
30+
```
31+
1132
Use is not recommended at this stage!

bun.lockb

408 Bytes
Binary file not shown.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "@gramio/callback-data",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"main": "dist/index.js",
55
"devDependencies": {
6-
"@types/bun": "^1.0.7",
7-
"gramio": "^0.0.20",
8-
"typescript": "^5.3.3"
6+
"@types/bun": "^1.1.1",
7+
"gramio": "^0.0.31",
8+
"typescript": "^5.4.5"
99
},
1010
"description": "Library for easily manage callback-data",
1111
"files": [

0 commit comments

Comments
 (0)