Add telegram message timestamp to event data (#87493)

This commit is contained in:
Matthias Dunda 2023-12-04 10:53:59 +01:00 committed by GitHub
parent bf49a3dcc2
commit 0f3cb9b1b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,7 @@ ATTR_CALLBACK_QUERY_ID = "callback_query_id"
ATTR_CAPTION = "caption"
ATTR_CHAT_ID = "chat_id"
ATTR_CHAT_INSTANCE = "chat_instance"
ATTR_DATE = "date"
ATTR_DISABLE_NOTIF = "disable_notification"
ATTR_DISABLE_WEB_PREV = "disable_web_page_preview"
ATTR_EDITED_MSG = "edited_message"
@ -991,6 +992,7 @@ class BaseTelegramBotEntity:
event_data: dict[str, Any] = {
ATTR_MSGID: message.message_id,
ATTR_CHAT_ID: message.chat.id,
ATTR_DATE: message.date,
}
if Filters.command.filter(message):
# This is a command message - set event type to command and split data into command and args