Use token from env

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
baalajimaestro 2022-04-09 20:17:19 +05:30
parent 4efe8e3428
commit 373d3da86f
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -1,4 +1,4 @@
import telebot, std/[asyncdispatch, logging, options, strutils, random, with], norm/[model, sqlite]
import telebot, std/[asyncdispatch, logging, options, strutils, random, with, os], norm/[model, sqlite]
type
CENSORED_DATA* = ref object of Model
@ -24,8 +24,7 @@ proc generate_hash(): string=
result[i] = sample(charset)
return result
# remember to strip your secret key to avoid HTTP error
const API_KEY = ""
const API_KEY = getEnv("TELEGRAM_TOKEN")
proc updateHandler(b: Telebot, u: Update): Future[bool] {.async, gcsafe.} =
var response = u.message.get