A Telegram bot that checks domain availability using the Domainr API. Zero dependencies and no build step, running on Deno Deploy.
Note
Due to api usage limits, this bot is only enabled for allowlisted Telegram handles but you can easily deploy your own following the instructions below.
-
Copy
.env.exampleto.envand update with your credentials -
Get your API credentials:
- Domainr RapidAPI Key: Get from https://rapidapi.com/domainr/api/domainr
- Sign up for RapidAPI and subscribe to the Domainr API (free tier available)
- Telegram Bot Token: Get from @BotFather
-
Run locally:
deno task dev # Start dev server with hot reload deno task test # Run integration tests
-
For local testing with Telegram, you need a public URL (use ngrok or Cloudflare Tunnels):
# Start dev server deno task dev # Set webhook to your tunnel URL deno task webhook https://your-tunnel-url/ # Verify webhook is set deno task webhook:info
-
Set environment variables in Deno Deploy:
TELEGRAM_BOT_TOKENDOMAINR_RAPIDAPI_KEYALLOW_HANDLES(required) - Comma-separated list of allowed Telegram usernames (without @). Example:user1,user2,user3
-
Deploy to Deno Deploy:
deployctl deploy --project=your-project index.ts
-
Set Telegram webhook:
deno task webhook https://your-project.deno.dev/
Or verify current webhook status:
deno task webhook:info