File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
- const { Client } = require ( 'tglib' )
2
- const { TextStruct } = require ( 'tglib/structs' )
1
+ const { Client, Structs } = require ( 'tglib' )
3
2
4
3
void async function ( ) {
5
4
const client = new Client ( {
@@ -37,7 +36,7 @@ void async function() {
37
36
replyText = `Sorry I do not understand <b>${ text } </b>.`
38
37
}
39
38
await client . tg . sendTextMessage ( {
40
- '$text' : new TextStruct ( replyText , 'textParseModeHTML' ) ,
39
+ '$text' : new Structs . TextStruct ( replyText , 'textParseModeHTML' ) ,
41
40
'chat_id' : 123456789 ,
42
41
'disable_notification' : true ,
43
42
'clear_draft' : false ,
Original file line number Diff line number Diff line change 1
- const { Client } = require ( 'tglib' )
1
+ const { Client, Structs } = require ( 'tglib' )
2
2
3
3
void async function ( ) {
4
4
const client = new Client ( {
@@ -32,4 +32,10 @@ void async function() {
32
32
} ,
33
33
} ,
34
34
} )
35
+
36
+ // or use tglib API
37
+ await client . tg . sendTextMessage ( {
38
+ '$text' : new Structs . TextStruct ( '<b>Hi bold</b>' , 'textParseModeHTML' ) ,
39
+ 'chat_id' : - 123456789 ,
40
+ } )
35
41
} ( )
You can’t perform that action at this time.
0 commit comments