/URL-Shortener-Bot-for-Telegram

This bot can shorten your URLs & magnet links. And also can unshorten your shorten URLs.

Primary LanguageJavaScript

URL Shortener Bot for Telegram

A Node.js Telegram bot which can shorten or unshorten your URLs. It can also shorten your magnet links.

This Bot won't work in groups. So it will be a wise decision if you disallow groups from bot father. Go to @BotFather > Bot Settings > Allow Groups? > Turn groups off

๐Ÿ› ๏ธ Built by

๐Ÿš€ Features

  • Supports 11 URL Shortener
    • tinyurl.com, cutt.ly, 1pt.co, is.gd, da.gd, v.gd, vo.la, bc.vc, goolnk.com, chilp.it, clck.ru
  • Supports custom alias
    • tinyurl.com, cutt.ly, 1pt.co, is.gd, da.gd, v.gd, vo.la
  • Magnet link Shortener
    • mgnet.me
  • URL Unshortener

โ‰๏ธ How to deploy

  1. Fork this repo
  2. From BotFather make a new bot and copy the BOT_TOKEN and paste it in the sample.env
  3. Write /mybots and select your bot and then **Edit Bot > Edit Commands** and paste the below Commands
  4. unshorten - Unshorten a shortened URL (/unshorten ) ๐Ÿ—œ
    features - Show the list of features ๐Ÿš€
    start - Check if I am alive ๐Ÿคจ
    help - Get some help ๐Ÿ†˜
    
  5. Go to TinyUrl, Cuttly, Vola, Bcvc and sign up to get an api key
  6. Copy the api keys and paste them in the sample.env file
  7. Press Commit New File
  8. Go to Replit and signup with your github account
  9. Press + Create tab
  10. Press Import from Github and select the forked repo
  11. Go to the Secrets tab

  12. Add the sample.env keys and values one by one and click Add new Secret

  13. After adding all 5 Secrets it should look like this

  14. Press the Run button and you should see something like this in the console

  15. Copy the url from the browser preview tab

  16. Add the url in a cron job website to prevent replit from going to sleep
  17. Go to Cron-job and sign up
  18. Then go to the Cronjobs tab and click Create Cronjob button
  19. Give it a title and paste the copied replit url in the URL field then change the Execution Schedule to Every 1 minute(s)

  20. Then press Create. Done! Now just check the bot it should work fine 24/7

๐Ÿ–ผ๏ธ Screenshot

๐Ÿ“จ Feedback

  • If you have any feedback or any suggestions, please reach out to me at Bipul Dey

  • Feel free to give Pull Requests and Bug Report

๐Ÿ–ค Please give this repo a star if you like it. This will encourage me to do more works like this