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

Added the ability to make blockquote expandable. #2343

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

EgorKhabarov
Copy link
Contributor

@EgorKhabarov EgorKhabarov commented Jul 10, 2024

Description

Include changes, new features and etc:
Added the ability to make blockquote expandable.

Describe your tests

How did you test your change?

bot.parse_mode = "HTML"
bot.send_message(chat_id, hcite("123"*123))
bot.send_message(chat_id, hcite("123"*123, expandable=True))
bot.parse_mode = "MarkdownV2"
bot.send_message(chat_id, mcite("123"*123))
bot.send_message(chat_id, mcite("123"*123, expandable=True))

image

Python version:

OS:

Checklist:

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

@Badiboy
Copy link
Collaborator

Badiboy commented Jul 10, 2024

LGTM.

@coder2020official ?

@coder2020official
Copy link
Collaborator

Markdown supports it:
**>The expandable block quotation started right after the previous block quotation

It is separated from the previous block quotation by an empty bold entity
Expandable block quotation continued
Hidden by default part of the expandable block quotation started
Expandable block quotation continued
The last line of the expandable block quotation with the expandability mark||

read more here:
https://core.telegram.org/bots/api#markdownv2-style

@EgorKhabarov
Copy link
Contributor Author

Indeed! I didn't know that. Corrected.

@EgorKhabarov EgorKhabarov changed the title Develop Added the ability to make blockquote expandable. Jul 10, 2024
@coder2020official
Copy link
Collaborator

and you tested different cases?

@EgorKhabarov
Copy link
Contributor Author

Yes

from telebot import TeleBot
from telebot.formatting import hcite, mcite


bot = TeleBot(token)

bot.parse_mode = "HTML"
bot.send_message(chat_id, hcite("123"*123))
bot.send_message(chat_id, hcite("123"*123, expandable=True))

bot.parse_mode = "MarkdownV2"
bot.send_message(chat_id, mcite("123"*123))
bot.send_message(chat_id, mcite("123"*123, expandable=True))

@Badiboy Badiboy merged commit e97e33e into eternnoir:master Jul 10, 2024
7 checks passed
@Badiboy
Copy link
Collaborator

Badiboy commented Jul 10, 2024

Thank you all )

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.

3 participants