ctucx.git: ctucxbot

[nimlang] A telegram bot

1 
2 
3 
4 
5 import asyncdispatch, telebot, strutils, osproc

proc uptimeCommand* (bot: Telebot, command: Command): Future[bool] {.async.} =
  let uptime = execProcess("uptime", options={poUsePath})
  discard await bot.sendMessage(command.message.chat.id, "```" & uptime & "```", replyToMessageId = command.message.messageId, parseMode = "markdown")