Skip to content

Commit 0685718

Browse files
committed
Fix
1 parent 37eb381 commit 0685718

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

telebot/formatting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,9 @@ def format_entity(entity, content):
425425
elif entity_type == "text_link" and hasattr(entity, 'url'):
426426
return _subs["text_link"].format(url=entity.url, text=content)
427427
elif entity_type == "custom_emoji" and hasattr(entity, 'custom_emoji_id'):
428-
return _subs["custom_emoji"].format(custom_emoji_id=entity.custom_emoji_id, content=content)
428+
return _subs["custom_emoji"].format(custom_emoji_id=entity.custom_emoji_id, text=content)
429429
elif entity_type == "date_time" and hasattr(entity, 'unix_time') and hasattr(entity, 'date_time_format'):
430-
return _subs["date_time"].format(unix=entity.unix_time, date_time_format=entity.date_time_format, content=content)
430+
return _subs["date_time"].format(unix=entity.unix_time, date_time_format=entity.date_time_format, text=content)
431431
elif entity_type == "pre" and hasattr(entity, 'language') and entity.language:
432432
return f"<pre><code class=\"language-{entity.language}\">{content}</code></pre>"
433433
elif entity_type in _subs:

0 commit comments

Comments
 (0)