File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,4 +8,25 @@ Library for easily manage callback-data.
88
99WIP. 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+
1132Use is not recommended at this stage!
Original file line number Diff line number Diff line change 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" : [
You can’t perform that action at this time.
0 commit comments