From eb7f3b76c64e6f44149c994eeba2bd203b43a51f Mon Sep 17 00:00:00 2001 From: baalajimaestro Date: Mon, 11 Apr 2022 11:29:57 +0530 Subject: [PATCH] Beautify the message sent Signed-off-by: baalajimaestro --- src/nim_censor_bot.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nim_censor_bot.nim b/src/nim_censor_bot.nim index 88eec0e..7245cc2 100644 --- a/src/nim_censor_bot.nim +++ b/src/nim_censor_bot.nim @@ -146,7 +146,7 @@ proc updateHandler(b: Telebot, u: Update): Future[bool] {.async, gcsafe.} = var CensoredRow = NewCensoredData(ftype, filehash, fileid, epochTime(), fcaption) with dbConn: insert CensoredRow - discard await b.sendMessage(response.chat.id, "Censored --> " & "tg://resolve?domain=botbotbotnotabot&start=" & filehash) + discard await b.sendMessage(response.chat.id, "*Censored " & capitalizeAscii(ftype) & "*\n\n[Tap to View](tg://resolve?domain=" & b.username & "&start=" & filehash & ")", parseMode = "Markdown") else: let filehash = GroupMedia[parseInt(response.mediaGroupId.get)] var CensoredRow = NewCensoredData(ftype, filehash, fileid, epochTime(), fcaption) @@ -158,7 +158,7 @@ proc updateHandler(b: Telebot, u: Update): Future[bool] {.async, gcsafe.} = var CensoredRow = NewCensoredData(ftype, filehash, fileid, epochTime(), fcaption) with dbConn: insert CensoredRow - discard await b.sendMessage(response.chat.id, "Censored --> " & "tg://resolve?domain=botbotbotnotabot&start=" & filehash) + discard await b.sendMessage(response.chat.id, "*Censored " & capitalizeAscii(ftype) & "*\n\n[Tap to View](tg://resolve?domain=" & b.username & "&start=" & filehash & ")", parseMode = "Markdown") OldDataCleanup() let bot = newTeleBot(getEnv("TELEGRAM_TOKEN"))