fix(bot-telegram): proper syntax support (#25)

This commit is contained in:
GramingFoxTeam
2023-09-23 14:26:38 +03:00
parent 28ca7fba30
commit 9d64070ca9
2 changed files with 5 additions and 6 deletions

View File

@@ -13,14 +13,13 @@ export default {
if (response.threshold > intent.confidence) return;
if (!response.reply) return;
// Because for some reason the markdown parser in TG is a pain in the ass,
// there won't be markdown support for now.
bot.sendMessage(
ids[0],
`**${response.reply.title}**\n\n${response.reply.description}\n`,
{
message_thread_id: ids[1],
reply_to_message_id: ids[2]
reply_to_message_id: ids[2],
parse_mode: 'markdown'
}
);

View File

@@ -6,14 +6,14 @@ export default {
for (const ocrReply of config.ocrResponses) {
if (ocrRes.ocrText.match(ocrReply.regex)) {
// Because for some reason the markdown parser in TG is a pain in the ass,
// there won't be markdown support for now.
bot.sendMessage(
ids[0],
`## ${ocrReply.reply.title}\n\n${ocrReply.reply.description}`,
{
message_thread_id: ids[1],
reply_to_message_id: ids[2]
reply_to_message_id: ids[2],
parse_mode: 'markdown'
}
);
break;