A Telegram bot built with Deno and grammY to get Hacker News.
- Clone the repository
git clone https://github.com/yourusername/hacker-news-bot.git
cd hacker-news-bot
- Copy
env.sh.example
file:
cp env.sh.example env.sh
- Run the bot:
make dev
- Install Deno Deploy CLI:
deno install -gArf jsr:@deno/deployctl
- Login to Deno Deploy:
deployctl login
-
Create new project on Deno Deploy
-
Configure environment variables:
- Go to project settings
- Add BOT_TOKEN with your Telegram bot token
-
Deploy your bot:
deployctl deploy --project=your-project-name --entrypoint=server.ts --prod
- Set up Telegram Webhook:
- Replace YOUR_BOT_TOKEN and YOUR_DENO_DEPLOY_URL
curl -X POST https://api.telegram.org/bot<BOT_TOKEN>/setWebhook?url=<YOUR_DENO_DEPLOY_URL>/<BOT_TOKEN>