Compare commits
2 commits
af73458e29
...
3bffd32df0
Author | SHA1 | Date | |
---|---|---|---|
3bffd32df0 | |||
a6aa04b2ca |
|
@ -33,7 +33,7 @@ class CommandProcessor:
|
||||||
self.bot.reply_to(
|
self.bot.reply_to(
|
||||||
message,
|
message,
|
||||||
'Supported commands:\n'
|
'Supported commands:\n'
|
||||||
' /add <feed url> - Add new feed\n '
|
' /add <feed url> - Add new feed\n'
|
||||||
' /list - List currently added feeds\n'
|
' /list - List currently added feeds\n'
|
||||||
' /del <feed url> - Remove feed\n'
|
' /del <feed url> - Remove feed\n'
|
||||||
' /help - Get this help message'
|
' /help - Get this help message'
|
||||||
|
@ -100,13 +100,13 @@ class Notifier:
|
||||||
self.bot.send_message(
|
self.bot.send_message(
|
||||||
chat_id=telegram_id,
|
chat_id=telegram_id,
|
||||||
text=self.__format_message(update),
|
text=self.__format_message(update),
|
||||||
parse_mode='MarkdownV2'
|
parse_mode='HTML'
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __format_message(item: FeedItem) -> str:
|
def __format_message(item: FeedItem) -> str:
|
||||||
return (
|
return (
|
||||||
f"**[{item.title}]({item.url})**\n\n"
|
f"<strong><a href=\"{item.url}\">{item.title}</a></strong>\n\n"
|
||||||
f"{item.description}"
|
f"{item.description}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue