₹0.00

No products in the cart.

contact@prgujju.com

₹0.00

No products in the cart.

sendChatAction: Send A Chat Action In telegram Bot Bots.business

More articles

- Advertisement -

Hello, friends welcome to our site technostone.xyz . Today, through this article, we are going to tell you how you can send chat action or set ChatAction in the Telegram bot. With Bots.business.

What Is Chat Action in Telegram

chat action is a feature. What we see in Telegram while doing Daily Telegram. For example, if a user is typing, then below his name above, we see typing. And if someone is sending a photo, then instead of typing, we see the sending photo. It works in all but when we create the boat, we do not see it because we have to set it manually, there are some codes for that which are given below.

- Advertisement -

This is the code below, it will work only in Telegram bot made on bots.business If you have created your Telegram bot in any other language then you can see Telegram API documents

1: TYPING CHAT ACTION

Api.sendChatAction({ 
chat_id: chat.chatid, 
action: "typing"
})
- Advertisement -

2: SENDING PHOTO CHAT ACTION

For Sending Photo Chat Action

Api.sendChatAction({ chat_id: chat.chatid, action: "upload_photo" })
- Advertisement -

3: SENDING VIDEO CHAT ACTION

Api.sendChatAction({ chat_id: chat.chatid, action: "upload_video" })

4: SENDING DOCUMENT CHAT ACTION

For Document Chat Action

Api.sendChatAction({ chat_id: chat.chatid, action: "upload_document" })

5: SENDING AUDIO  CHAT ACTION

Api.sendChatAction({ chat_id: chat.chatid, action: "upload_audio" })

Use this method when you need to tell the user that something is happening on the bot’s side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
There is some other chat action here that you can do.
chat_id Unique identifier for the target chat or username of the target channel.
Action
  • typing – For Text Message
  • upload_photo – For sending Photoimage file
  • upload_audio – For Sending Audio File
  • record_audio – For Audio File Recoding
  • upload_video – For Sending Video File
  • record_video – For Video File Recoding
  • upload_document – For Sending Document File
  • find_location – For Sending Location
  • upload_video_note – For Sending Video Note
  • record_video_note – For Video note
This is some ChatAction that you can do to make your telegram bot attractive, I hope you liked this post, if you liked the post, then you can join our youtube family by clicking on the subscribe button below.

- Advertisement -

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest