deleteMessageReaction
Xóa cảm xúc khỏi tin nhắn (Bot API 10.0).
Giá trị trả về: Nếu thành công, trả về True.
Tham số
| Tham số | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
chat_id | Integer or String | Có | ID chat hoặc @username |
message_id | Integer | Có | ID tin nhắn |
user_id | Integer | Tùy chọn | ID người dùng có cảm xúc cần xóa |
actor_chat_id | Integer | Tùy chọn | ID chat có cảm xúc cần xóa |
Ví dụ request
curl
curl -s -X POST "https://api.telegram.org/bot$TOKEN/deleteMessageReaction" \
-H "Content-Type: application/json" \
-d '{"chat_id":123456789,"message_id":42}'
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
f"https://api.telegram.org/bot{TOKEN}/deleteMessageReaction",
json={
"chat_id": 123456789,
"message_id": 42
},
timeout=30,
)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/deleteMessageReaction`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"chat_id": 123456789,
"message_id": 42
}),
});
console.log(await res.json());
Hướng dẫn từng bước: Cách tạo bot Telegram từ A đến Z: BotFather, token và tin nhắn đầu tiên
Phương thức liên quan
getChatLấy thông tin chat.getChatMemberLấy thông tin thành viên chat.getChatMemberCountTrả về số lượng thành viên chat.getChatAdministratorsTrả về danh sách quản trị viên của chat.setChatTitleĐặt tiêu đề chat.setChatDescriptionĐặt mô tả chat.setChatPhotoĐặt ảnh chat.deleteChatPhotoXóa ảnh chat.setChatPermissionsĐặt quyền trong chat.leaveChatRời khỏi chat.exportChatInviteLinkXuất liên kết mời chính của chat.createChatInviteLinkTạo liên kết mời.