From 9be7bdc868b1b9bf3445faaa5fae55ad48b23d22 Mon Sep 17 00:00:00 2001 From: Igor Kamyshev Date: Thu, 18 Jul 2019 14:32:33 +0300 Subject: [PATCH] feat: add method for sending markdown --- lib/TelegramClient.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/TelegramClient.ts b/lib/TelegramClient.ts index 45c328b..c3be2c5 100644 --- a/lib/TelegramClient.ts +++ b/lib/TelegramClient.ts @@ -22,4 +22,13 @@ export class TelegramClient { ): Promise { await this.telegram.sendMessage(chatId, text) } + + public async sendMarkdown( + chatId: string | number, + markdown: string, + ): Promise { + await this.telegram.sendMessage(chatId, markdown, { + parse_mode: 'Markdown', + }) + } }