Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect return type specified in the documentation #2094

Closed
AsMaNick opened this issue Dec 8, 2023 · 2 comments
Closed

Incorrect return type specified in the documentation #2094

AsMaNick opened this issue Dec 8, 2023 · 2 comments

Comments

@AsMaNick
Copy link
Contributor

AsMaNick commented Dec 8, 2023

Please answer these questions before submitting your issue. Thanks!

  1. What version of pyTelegramBotAPI are you using?
    4.10.0
  2. What OS are you using?
    Both Linux/Windows 10
  3. What version of python are you using?
    Python 3.9.0

The method telebot.TeleBot.copy_message has wrong type of return data specified in the documentation:

:return: On success, the sent Message is returned.
:rtype: :class:`telebot.types.Message`

In fact this method returns types.MessageID that can be seen at the beginning of the method declaration.

It's also interesting why this method can't return telebot.types.Message as all similar methods (like send_message, forward_message) do.

@Badiboy
Copy link
Collaborator

Badiboy commented Dec 8, 2023

  1. Confirm. Please, make the request with description fix.
  2. Your question have reason. But this is the behaviour of Telegram Bot API: https://core.telegram.org/bots/api#copymessage

@AsMaNick
Copy link
Contributor Author

AsMaNick commented Dec 9, 2023

Done, please check the pull request #2095.

@Badiboy Badiboy closed this as completed Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants