diff --git a/gramjs/client/telegramBaseClient.ts b/gramjs/client/telegramBaseClient.ts index 4a251cec..f5d48ea3 100644 --- a/gramjs/client/telegramBaseClient.ts +++ b/gramjs/client/telegramBaseClient.ts @@ -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) { this._errorHandler = async (error: Error) => { diff --git a/gramjs/tl/custom/message.ts b/gramjs/tl/custom/message.ts index 7b65c8a6..d2deb04e 100644 --- a/gramjs/tl/custom/message.ts +++ b/gramjs/tl/custom/message.ts @@ -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}) * ``` */