mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +00:00
feat: Support for message reaction event
This commit is contained in:
parent
d323a3bac5
commit
7fe501f19f
@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
|
||||
## [0.65.1][0.65.1] - 2024-03-09
|
||||
|
||||
1. Support for updates (@danielperez9430)
|
||||
* message_reaction
|
||||
|
||||
## [0.65.0][0.65.0] - 2024-02-20
|
||||
|
||||
1. Support Telegram Bot API v7.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-telegram-bot-api",
|
||||
"version": "0.65.0",
|
||||
"version": "0.65.1",
|
||||
"description": "Telegram Bot API",
|
||||
"main": "./index.js",
|
||||
"directories": {
|
||||
|
@ -55,6 +55,7 @@ const _messageTypes = [
|
||||
'chat_invite_link',
|
||||
'chat_member_updated',
|
||||
'web_app_data',
|
||||
'message_reaction'
|
||||
];
|
||||
const _deprecatedMessageTypes = [
|
||||
'new_chat_participant', 'left_chat_participant'
|
||||
@ -685,6 +686,7 @@ class TelegramBot extends EventEmitter {
|
||||
const chatMember = update.chat_member;
|
||||
const myChatMember = update.my_chat_member;
|
||||
const chatJoinRequest = update.chat_join_request;
|
||||
const messageReaction = update.message_reaction;
|
||||
|
||||
if (message) {
|
||||
debug('Process Update message %j', message);
|
||||
@ -782,6 +784,9 @@ class TelegramBot extends EventEmitter {
|
||||
} else if (chatJoinRequest) {
|
||||
debug('Process Update my_chat_member %j', chatJoinRequest);
|
||||
this.emit('chat_join_request', chatJoinRequest);
|
||||
} else if (messageReaction) {
|
||||
debug('Process Update message_reaction %j', messageReaction);
|
||||
this.emit('message_reaction', messageReaction);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user