Giter VIP home page Giter VIP logo

leomediasearchbot's Introduction

Leo Media Search Bot ๐Ÿ‡ฑ๐Ÿ‡ฐ

Features

  • Index channel or group files for inline search.
  • When you post file on telegram channel or group this bot will save that file in database, so you can search easily in inline mode.
  • Supports document, video and audio file formats with caption support.
  • Broadcast to the all of users in database
  • Can view user stats in bot's database
  • Can ban or unban any user from database

ย 

Installation

Easy Way

Deploy To Heroku

Deploy on Heroku

Hard Way

# Create virtual environment
python3 -m venv env

# Activate virtual environment
env\Scripts\activate.bat # For Windows
source env/bin/activate # For Linux or MacOS

# Install Packages
pip3 install -r requirements.txt

# Edit info.py with variables as given below then run bot
python3 bot.py

Check sample_info.py before editing info.py file

Variables

Required Variables

  • BOT_TOKEN: Create a bot using @BotFather, and get the Telegram API token.
  • API_ID: Get this value from telegram.org
  • API_HASH: Get this value from telegram.org
  • CHANNELS: Username or ID of channel or group. Separate multiple IDs by space
  • ADMINS: Username or ID of Admin. Separate multiple Admins by space
  • DATABASE_URI: mongoDB URI. Get this value from [mongoDB]
  • DATABASE_NAME: Name of the database in mongoDB
  • BOT_OWNER : user id of the owner
  • SESSION : A session name for save users in db.
  • BOT_USERNAME : Bot' username . Get it from botfather..
  • UPDATES_CHANNEL: Username or ID of channel. Without subscribing this channel users cannot use bot.

Optional Variables

  • COLLECTION_NAME: Name of the collections. Defaults to Telegram_files. If you going to use same database, then use different collection name for each bot
  • MAX_RESULTS: Maximum limit for inline search results
  • CACHE_TIME: The maximum amount of time in seconds that the result of the inline query may be cached on the server
  • USE_CAPTION_FILTER: Whether bot should use captions to improve search results. (True/False)
  • AUTH_USERS: Username or ID of users to give access of inline search. Separate multiple users by space. Leave it empty if you don't want to restrict bot usage.
  • LOG_CHANNEL: a channel id for save all the logs of bot
  • START_MSG: Bot's Start Msg.
  • USERBOT_STRING_SESSION: User bot string session.

Admin commands

channel - Get basic infomation about channels
total - Show total of saved files
delete - Delete file from database
index - Index all files from channel or group
logger - Get log file
stats - get recent user stats
broadcast - broascast any message to all the users of bot
banuser - to ban a user from database
unbanuser - to unban a user from database
bannedusers - Get banned users list

Tips

  • Use index command or run one_time_indexer.py file to save old files in the database that are not indexed yet.
  • You can use | to separate query and file type while searching for specific type of file. For example: Avengers | video
  • If you don't want to create a channel or group, use your chat ID / username as the channel ID. When you send a file to a bot, it will be saved in the database.

Contributions

Contributions are welcome.

Special Thanks

Imported some codes from Media Search Repo โค๏ธ

Support Group ๐Ÿ‡ฑ๐Ÿ‡ฐ

Updates Channel ๐Ÿ‡ฑ๐Ÿ‡ฐ

leomediasearchbot's People

Contributors

naviya2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.