Skip to content

message_handler: Processes the first two media together when sent simultaneously (type: media_group_id) #2391

Open
@tandat132

Description

@tandat132

Please answer these questions before submitting your issue. Thanks!

  1. What version of pyTelegramBotAPI are you using?
    4.22.1
  2. What OS are you using?
    windows
  3. What version of python are you using?
    3.11.9

The first two media files are processed together, leading to the same output or action being applied to both.
Code:

i = 1
@bot.message_handler(func=lambda message: True)
def handle_message(message):
     global i
     print(i)
     print(message)
     i = i+1

Result:

1
1
message
message
2
message
3
message
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions