From 3e5c1b415fcaf756bebfbdc59d30dce7f1e10820 Mon Sep 17 00:00:00 2001 From: baalajimaestro Date: Mon, 11 Apr 2022 15:45:01 +0530 Subject: [PATCH] Enable webhooks on bot Signed-off-by: baalajimaestro --- src/nim_censor_bot.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nim_censor_bot.nim b/src/nim_censor_bot.nim index 22b6daa..2616bf5 100644 --- a/src/nim_censor_bot.nim +++ b/src/nim_censor_bot.nim @@ -221,4 +221,4 @@ bot.onUpdate(updateHandler) bot.onCommand("start", startHandler) bot.onCommand("ban", banHandler) bot.onCommand("unban", unbanHandler) -bot.poll(timeout=300) +bot.startWebhook(getEnv("HOOK_SECRET"), getEnv("HOOK_DOMAIN") & "/" & getEnv("HOOK_SECRET"))