Skip to content

reply_text keyword argument allow_sending_without_reply fails when do_quote is True #4807

@Poolitzer

Description

@Poolitzer

Issue

The call await update.message.reply_text("Message",allow_sending_without_reply=True, do_quote=True) gives the following error:

ValueError: "allow_sending_without_reply" and "reply_parameters" are mutually exclusive.

Thoughts to resolve them

I am not sure how we want to deal with it. On the one hand, this being by default only the case in groups will make it harder to spot when developing the bot, and the error is not helpful since the user didn't actually pass reply_parameters, the library did for them.

On the other hand this is a depreciated argument, so one could totally argue that an user who went through the effort of doing this could instead use

await update.message.reply_text(
                    "Message",
                    reply_parameters=ReplyParameters(update.message.message_id, allow_sending_without_reply=True)
                )

without much effort.

This comes from the group and my debugging efforts because I didnt understand the issue first either. https://t.me/pythontelegrambotgroup/779293?thread=779293

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions