Try it out now! @GetShortUrlBot
/start
Start bot/help
How to use bot
- Create a bot from Telegram, sending this message to @BotFather | Reference
/newbot
- Clone this repo
git clone https://github.com/jabjabrik/url-shortener-bot.git
cd url-shortener-bot
npm install
cp .env.example .env
to create the env file- Edit the .env file and set the Bot token & API keys
BOT_TOKEN = YOUR_BOT_TOKEN
API_KEY_TINYURL = YOUR_API_KEY_TINYURL
API_KEY_BITLY = YOUR_API_KEY_BITLY
API_KEY_CUTTLY = YOUR_API_KEY_CUTTLY
- Run locally
npm run dev
Deploy on Cyclic
- Login to Cyclic using github account
- Click "New App" to create the project
- On tab "Link your own" Select your repository
- Connect..
- Add some variables like this
- set webhook
https://api.telegram.org/bot{BOT_TOKEN}/setWebhook?url={URL_PROD}
- Bot deployed!!