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

Replaced deprecated reply_to_message_id with reply_parameters in custom_states examples #2399

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

damascene
Copy link

Description

I've replaced the deprecated reply_to_message_id with reply_parameters in the custom_states examples. I did that after noticing a deprecation message in the logs but couldn't see an example of usage of the new method.

On Telegram I saw this so I used it:

bot.send_message(
    <CHAT_ID>,
    <TEXT>,
    reply_parameters=telebot.types.ReplyParameters(
        message_id=<QUOTED_MESSAGE_ID>,
        chat_id=<QUOTED_CHAT_ID>,
        quote=<QUOTED_TEXT>
    )
)

Describe your tests

I've tested the example code after modification and it seems to have behaved as expected.

Python version: 3.10

Checklist:

  • [ x] I added/edited example on new feature/change (if exists)
  • [ x] My changes won't break backward compatibility
  • [x ] I made changes both for sync and async

@damascene damascene changed the title Replaced deprecated reply_to_message_id with reply_parameters Replaced deprecated reply_to_message_id with reply_parameters in custom_states examples Sep 30, 2024
@Badiboy
Copy link
Collaborator

Badiboy commented Sep 30, 2024

Thank you!

@Badiboy Badiboy merged commit a6ab6b4 into eternnoir:master Sep 30, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants