/url-shortener-bot

🤖 Url Shortener telegram bot with telegraf library and deploy to heroku

Primary LanguageJavaScript

🌐 Url Shortener Telegram Bot Nodejs

bot demo @GetShortUrlBot

Available Bot Commands

  • /start Start bot

Required

Get Started

  1. Create a bot from Telegram, sending this message to @BotFather | Reference
/newbot
  1. Clone this repo
git clone https://github.com/jabjabrik/url-shortener-bot.git
cd url-shortener-bot
npm install
  1. Put the token received into a file called .env
BOT_TOKEN = YOUR_BOT_TOKEN
  1. Run locally
npm start

Deploy it!

  1. Install Heroku CLI
npm install -g heroku
  1. Login to heroku
heroku login
  1. Create a new project
heroku create {ProjectName}
  1. Put your project name in the .env file.
HEROKU_URL = https://{ProjectName}.herokuapp.com
  1. Commit your code and deploy to heroku server
npm run deploy
  1. View logs
heroku logs

Star this Repo if you Liked it ⭐⭐⭐