Silence all logs

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
baalajimaestro 2022-04-11 12:49:45 +05:30
parent 0bd5a5eb40
commit 5efcf196f5
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -10,7 +10,7 @@ import std/[asyncdispatch, logging, options, strutils, random, with, os, tables,
import norm/[model, sqlite] import norm/[model, sqlite]
# Logging Level # Logging Level
var L = newConsoleLogger(fmtStr="$levelname, [$time] ") var L = newConsoleLogger(levelThreshold=lvlError, fmtStr="$levelname, [$time] ")
addHandler(L) addHandler(L)
# Custom Types Defined to handle tables on norm # Custom Types Defined to handle tables on norm
@ -190,5 +190,8 @@ proc updateHandler(b: Telebot, u: Update): Future[bool] {.async, gcsafe.} =
# Start the bot # Start the bot
let bot = newTeleBot(getEnv("TELEGRAM_TOKEN")) let bot = newTeleBot(getEnv("TELEGRAM_TOKEN"))
echo "*********************"
echo "CensorBot is running!"
echo "*********************"
bot.onUpdate(updateHandler) bot.onUpdate(updateHandler)
bot.poll(timeout=300) bot.poll(timeout=300)