Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
painor committed Mar 12, 2024
1 parent 2a13c07 commit e61fbcb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions gramjs/client/telegramBaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,12 @@ export abstract class TelegramBaseClient {

/**
* Custom error handler for the client
* @example
* ```ts
* client.onError = async (error)=>{
* console.log("error is",error)
* }
* ```
*/
set onError(handler: (error: Error) => Promise<void>) {
this._errorHandler = async (error: Error) => {
Expand Down
6 changes: 3 additions & 3 deletions gramjs/tl/custom/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ interface MessageBaseInterface {
* await message.click(row, column)
*
* # Click by text
* await message.click(text='👍')
* await message.click({text:'👍'})
*
* # Click by data
* await message.click(data=b'payload')
* await message.click({data:'payload'})
*
* # Click on a button requesting a phone
* await message.click(0, share_phone=True)
* await message.click(0, {share_phone:true})
* ```
*/

Expand Down

0 comments on commit e61fbcb

Please sign in to comment.