1
2
3
4
5
6
7
8
import asyncdispatch, strformat, strutils, times, telebot
proc daysUntilCongressCommand* (bot: Telebot, command: Command): Future[bool] {.async.} =
let difference = parse("2020-12-26", "yyyy-MM-dd") - now()
let days = difference.inDays()
let answer = fmt"{days}"
discard await bot.sendMessage(command.message.chat.id, answer, replyToMessageId = command.message.messageId)