Skip to content

Commit

Permalink
Add support for expandable_blockquote
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew000 authored and RootShinobi committed Jun 1, 2024
1 parent ffc8387 commit e2dab83
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion aiogram_i18n/utils/text_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ def spoiler(self, value: str) -> str:
def quote(self, value: str) -> str:
return value

def custom_emoji(self, value: str, custom_emoji_id: str) -> str:
return value

def blockquote(self, value: str) -> str:
return value

def custom_emoji(self, value: str, custom_emoji_id: str) -> str:
def expandable_blockquote(self, value: str) -> str:
return value


Expand All @@ -70,6 +73,8 @@ def functions(self) -> Dict[str, Callable[..., Any]]:
"SPOILER": self.spoiler,
"QUOTE": self.quote,
"CUSTOM_EMOJI": self.custom_emoji,
"BLOCKQUOTE": self.blockquote,
"EXPANDABLE_BLOCKQUOTE": self.expandable_blockquote,
}

@property
Expand Down Expand Up @@ -122,5 +127,11 @@ def custom_emoji(
) -> str:
return self.get_decoration(parse_mode=parse_mode).custom_emoji(value, custom_emoji_id)

def blockquote(self, value: str, parse_mode: Optional[str] = None) -> str:
return self.get_decoration(parse_mode=parse_mode).blockquote(value)

def expandable_blockquote(self, value: str, parse_mode: Optional[str] = None) -> str:
return self.get_decoration(parse_mode=parse_mode).expandable_blockquote(value)


td = TextDecoration()

0 comments on commit e2dab83

Please sign in to comment.