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.
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" })
2: SENDING PHOTO CHAT ACTION
For Sending Photo Chat Action
Api.sendChatAction({ chat_id: chat.chatid, action: "upload_photo" })
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" })
chat_id | Unique identifier for the target chat or username of the target channel. |
---|---|
Action |
|
https://www.youtube.com/watch?v=Ev3ZcSEpzG4