Skip to content

wildandhya/hacker-new-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Bot Hacker News

A Telegram bot built with Deno and grammY to get Hacker News.

🚀 Getting Started

Local Development

  1. Clone the repository
git clone https://github.com/yourusername/hacker-news-bot.git
cd hacker-news-bot
  1. Copy env.sh.example file:
cp env.sh.example env.sh
  1. Run the bot:
make dev

Production Deployment

  1. Install Deno Deploy CLI:
deno install -gArf jsr:@deno/deployctl
  1. Login to Deno Deploy:
deployctl login
  1. Create new project on Deno Deploy

  2. Configure environment variables:

    • Go to project settings
    • Add BOT_TOKEN with your Telegram bot token
  3. Deploy your bot:

deployctl deploy --project=your-project-name --entrypoint=server.ts --prod
  1. 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>

Releases

No releases published

Packages

No packages published