Skip to content

This Telegram bot is built using the python-telegram-bot library and performs various tasks within Telegram.

License

Notifications You must be signed in to change notification settings

bishalqx980/tgbot

Repository files navigation

tgbot

This Telegram bot is built using the python-telegram-bot library version 20.7 and performs various tasks within Telegram.

_check = "Does the user Starred & forked the repository?"
if _check:
    print("Thanks you ❤️ for sharing love & giving me inspiration...")
else:
    print("Please 🥺 give a star to this repo! ...And fork it if you want to work with this repo!")

- Fun fact: _check will always return True! [ becasue you (gave/will give) a star & fork the repo lol ] Thanks :)

Features ✨:

  • ChatGPT AI: Get response from ChatGPT AI
  • AI Imazine: Generate image from your prompt
  • Group Management: Manage Group as an active admin
    • Welcome user, notify when user leave
    • Moderation: ban, unban, mute, unmute, kick, kickme...
    • Antibot, etc.
    • many more feature...
  • YouTube Download Download/Search videos from YouTube
  • Movie Info: Provide movie information
  • Language Translator: Translate languages
  • Encode/Decode base64: Encode/decode base64
  • URL Shortener: Shorten URLs using shrinke.me api
  • Ping Website Ping any URL
  • Calculator: Works as everyday calculator
  • Echo: Echo your message for fun
  • Webshot Take website screenshot
  • Weather Provide weather information
  • & Much more...

More Feature coming soon...

• • • • • • • • • • • • • • • • • • • •

How to Deploy 🚀:

Setup 📦
  • Rename sample_config.env to config.env then fillup config.env file value's

  • BOT_TOKEN Get from https://t.me/BotFather E.g. 123456:abcdefGHIJK...

  • OWNER_ID Get from bot by /id command E.g. 2134776547

  • OWNER_USERNAME Your Username E.g. paste like bishalqx980 not @bishalqx980

  • MONGODB_URI Get from https://www.mongodb.com/

  • DB_NAME anything E.g. MissCiri_db

  • After deployment complete, don't forget to visit /bsetting


    Local Deploy 🚀

    ----- Windows -----

    • Required python 3.11 or later
    • Open tgbot directory on cmd
    • Run on cmd pip install -r requirements.txt
    • Finally start.cmd

    ----- Linux -----

    • Required python 3.11 or later
    • Open tgbot directory on shell
    • pip install -r requirements.txt
    • Finally bash start.sh
    Render Deploy 🚀

    Branch main

    Runtime Python 3

    Build Command pip install -r requirements.txt

    Start Command python main.py

    Instance Type Free (maybe paid)

    ⚠ Advanced option > Add secret file filename: config.env - file content: paste all content from sample_config.env (make sure you filled up everything)

    [ If you face anyproblem accessing Advanced option then just click on Create Web Service then from Environment > Secret Files add the config.env calues... Then restart/redeploy the web service ]

    Finally click on Create Web Service & wait few sec for deployment & Done | Enjoy 🎉

    Heroku Deploy 🚀
    • Signin/Signup on http://heroku.com/
    • Give a star ⭐ and fork this repo https://github.com/bishalqx980/tgbot
    • Goto your forked repo settings > General > Check ✅ Template repository
    • Come back and on the right top corner you will see a green button name Use this template, click on that and create a new private repo with these files
    • On that private repo upload your config.env file and make sure required all values are filled up
    • Then goto the private repo settings > secrets and variables > Actions
    • Click on New respository secret
      • Name: HEROKU_EMAIL
      • Secret: your_heroku_email
      • Repeat the step and add HEROKU_APP_NAME - unique name eg. tgbot007oc-bishalqx980
      • Add HEROKU_API_KEY - get from https://dashboard.heroku.com/account scroll down API Key click on Reveal button then copy the value and paste it...
    • Finally click on Actions tab from the top, select Deploy to heroku, on right side click on Run workflow > green button Run workflow
    • Now wait for deployment complete... (you can check log here https://dashboard.heroku.com/apps/HEROKU_APP_NAME/logs)
    • ⚠️ Add Server url from /bsetting before heroku shutdown... then restart dyno (heroku)

    Enjoy 🍾

License

GPL-3.0 © @bishalqx980
Original Creator - bishalqx980