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 type
CENSORED_DATA* = ref object of Model CENSORED_DATA* = ref object of Model
@ -24,8 +24,7 @@ proc generate_hash(): string=
result[i] = sample(charset) result[i] = sample(charset)
return result return result
# remember to strip your secret key to avoid HTTP error const API_KEY = getEnv("TELEGRAM_TOKEN")
const API_KEY = ""
proc updateHandler(b: Telebot, u: Update): Future[bool] {.async, gcsafe.} = proc updateHandler(b: Telebot, u: Update): Future[bool] {.async, gcsafe.} =
var response = u.message.get var response = u.message.get