Skip to content

Setting up the config.env file

Tamil Updates edited this page Mar 14, 2023 · 2 revisions

NOTE

Remove the first line saying: _____REMOVE_THIS_LINE_____=True

RECOMMNED SETUP

  • Setup only Required Variable & DATABASE_URL
  • Rest of variable can be setup using BOT by /bsetting command

REQUIRED CONFIG

  • BOT_TOKEN : The Telegram Bot Token that you got from @BotFather. Str
  • OWNER_ID : The Telegram User ID (not username) of the Owner of the bot. Int
  • TELEGRAM_API : This is to authenticate your Telegram account for downloading Telegram files. You can get this from https://my.telegram.org. Int
  • TELEGRAM_HASH : This is to authenticate your Telegram account for downloading Telegram files. You can get this from https://my.telegram.org. Str

OPTIONAL CONFIG

  • GDRIVE_ID : This is the Folder/TeamDrive ID of the Google Drive Folder to which you want to upload all the mirrors.
  • DOWNLOAD_DIR : The path to the local folder where the downloads should be downloaded to.
  • DOWNLOAD_STATUS_UPDATE_INTERVAL : Time in seconds after which the progress/status message will be updated. Recommended 10 seconds at least. Int
  • AUTO_DELETE_MESSAGE_DURATION : Interval of time (in seconds), after which the bot deletes it's command message. NOTE: Set to -1 to disable auto message deletion. Int
  • AUTO_DELETE_UPLOAD_MESSAGE_DURATION : Interval of time (in seconds), after which the bot deletes it's upload message. NOTE: Set to -1 to disable auto message deletion. Int
  • IS_TEAM_DRIVE : Set True if uploading to TeamDrive. Default is False.
  • DATABASE_URL : Your SQL Database URL. Follow this Generate Database to generate database. Data will be saved in Database: auth and sudo users, leech settings including thumbnails for each user, rss data and incomplete tasks. NOTE: If you want to use heroku postgresql delete this variable from config.env file. DATABASE_URL will be grabbed from heroku variables.
  • AUTHORIZED_CHATS : Fill user_id and chat_id of groups/users you want to authorize. Separate them by space.
  • SUDO_USERS : Fill user_id of users whom you want to give sudo permission. Separate them by space.
  • IGNORE_PENDING_REQUESTS : Ignore pending requests after restart. Default is False.
  • USE_SERVICE_ACCOUNTS : Whether to use Service Accounts or not. For this to work see Using Service Accounts section below. Default is False.
  • SA_MAIL : SA Email id To display in USER TD Section
  • INDEX_URL : Index Url not end with \ Refer to https://gitlab.com/GoogleDriveIndex/Google-Drive-Index.
  • STATUS_LIMIT : Limit the no. of tasks shown in status message with buttons. NOTE: limit must be is 2 tasks if PICS enable.
  • STOP_DUPLICATE : Bot will check file in Drive, if it is present in Drive, downloading or cloning will be stopped. (NOTE: File will be checked using filename not file hash, so this feature is not perfect yet). Default is False.
  • CMD_SUFFIX : commands index number. This number will added at the end all commands.
  • UPTOBOX_TOKEN : Uptobox token to mirror uptobox links. Get it from Uptobox Premium Account.
  • TORRENT_TIMEOUT : Timeout of dead torrents downloading with qBittorrent and Aria2c in seconds.
  • EXTENSION_FILTER : File extensions that won't upload/clone. Separate them by space.
  • INCOMPLETE_TASK_NOTIFIER : Get incomplete task messages after restart. Require database and (supergroup or channel). Default is False.
  • TGH_THUMB : Give Telegraph URL(graph.org) for Logs/File Thumbnail

TURN ON/OFF FUCTIONS

  • LEECH_ENABLED : Enable or disable leech command for authorized chats. Default is False
  • MIRROR_ENABLED : Enable or disable mirror command for authorized chats. Default is False
  • QB_MIRROR_ENABLED : Enable or disable mirror command for authorized chats. Default is False
  • WATCH_ENABLED : Enable or disable watch command for authorized chats. Default is False
  • CLONE_ENABLED : Enable or disable clone command for authorized chats. Default is False
  • ANILIST_ENABLED : Enable or disable anilist command for authorized chats. Default is False
  • WAYBACK_ENABLED : Enable or disable wayback command for authorized chats. Default is False
  • MEDIAINFO_ENABLED : Enable or disable mediainfo command for authorized chats. Default is False
  • SET_BOT_COMMANDS : Auto set bot commands in bot i.e no need to set bot command manually using botfather. Default is False

UPDATE

  • UPSTREAM_REPO : Your github repository link, if your repo is private add https://username:{githubtoken}@github.com/{username}/{reponame} format. Get token from Github settings. So you can update your bot from filled repository on each restart. NOTE: Any change in docker or requirements you need to deploy/build again with updated repo to take effect. DON'T delete .gitignore file. For more information read THIS.
  • UPSTREAM_BRANCH : Upstream branch for update. Default is update.
  • UPDATE_PACKAGES : Default is False

PM SUPPORT

  • BOT_PM : set it True if you want to send mirror links and leeched files in user's PM, Default is False. User can Enable/Disable by using BOT /usetting
  • FORCE_BOT_PM : set it True then No User can Enable/Disable BOT_PM by using BOT /usetting

LEECH

  • LEECH_LOG : Chat id of channel/group where leeched files will be uploaded, NOTE: only put 1 channel/group id starts with -100xxxxxxxxx, NOTE add bot in that channel/group as Admin, if you leave this empty bot will sent leech files in current chat.
  • LEECH_LOG_URL : Convert the join leech log warning text on final upload message to your leech log invite link. Add the invite link or either use the public link of leech log channel.
  • LEECH_LOG_INDEXING : Set it to True if you also want Leech file indexing in Leech log channel. Default is False

MIRROR

  • ENABLE_USR_TD : If this True then User can create its own TD Category
  • MIRROR_LOGS : Chat id of channels/groups where you want to store Mirror logs. NOTE: Add bot in Mirror logs channel/group as Admin.
  • MIRROR_LOG_URL : Convert the join mirror log warning text on final upload message to your mirror log invite link. Add the invite link or either use the public link of mirror log channel.
  • LINK_LOG : Chat id of channel/group where link have to be send, NOTE: only put 1 channel/group id starts with -100xxxxxxxxx, NOTE add bot in that channel/group as Admin.

OTHER

  • TG_SPLIT_SIZE : Size of split in bytes. Default is 2GB.
  • AS_DOCUMENT : Default type of Telegram file upload. Default is False mean as media.
  • EQUAL_SPLITS : Split files larger than TG_SPLIT_SIZE into equal parts size (Not working with zip cmd). Default is False.
  • PAID_SERVICE : Set it to True if you start the Paid Group
  • TIMEZONE : Default is Asia/Kolkata. TIMEZONE LIST.

TELEGRAPH UI (graph.org)

  • TITLE_NAME : Title name for Telegraph pages (while using /list command)
  • AUTHOR_NAME : Author name for Telegraph pages
  • AUTHOR_URL : Author URL for Telegraph page
  • GD_INFO : Description of file uploaded to gdrive using bot

MULTI FORCE SUBSCRIBE

  • FSUB_IDS : Each ID Should be seperated by Space & ID must be started with -100xxxxxxx

QBITORRENT

  • BASE_URL_OF_BOT : Valid BASE URL where the bot is deployed to use qbittorrent web selection. Also required for Heroku to avoid app sleeping/idling. For Heroku fill https://yourappname.herokuapp.com. Still got idling? You can use http://cron-job.org/ to ping your Heroku app.
  • SERVER_PORT : Not require for heroku.
  • WEB_PINCODE : If empty or False means no more pincode required while qbit web selection.
  • QB_SEED : QB torrent will be seeded after and while uploading until reaching specific ratio or time, edit MaxRatio or GlobalMaxSeedingMinutes or both from qbittorrent.conf (-1 means no limit, but u can cancel manually by gid). NOTE: 1. Don't change MaxRatioAction, 2. Only works with /qbmirror and /qbzipmirror. Default is False. Bool
    • Qbittorrent NOTE: If your facing ram exceeded issue then set limit for MaxConnecs, decrease AsyncIOThreadsCount in qbittorrent config and set limit of DiskWriteCacheSize to 32.

QUEUE SYSTEM

  • QUEUE_ALL: Number of parallel tasks of downloads from (mega, telegram, yt-dlp, gdrive) + all uploads. For example if 20 task added and QUEUE_ALL is 8, then the summation of uploading and downloading tasks are 8 and the rest in queue. Int. NOTE: if you want to fill QUEUE_DOWNLOAD or QUEUE_UPLOAD, then QUEUE_ALL value must be greater than or equal to the greatest one and less than or equal to summation of QUEUE_UPLOAD and QUEUE_DOWNLOAD.
  • QUEUE_DOWNLOAD: Number of parallel downloading tasks from mega, telegram, yt-dlp and gdrive. Int
  • QUEUE_UPLOAD: Number of all parallel uploading tasks. Int

RSS

  • RSS_DELAY : Time in seconds for rss refresh interval. Recommended 900 second at least. Default is 900 in sec.
  • RSS_COMMAND : Choose command (like /mirror, /qbmirror, /leech....) for the desired action.
  • RSS_CHAT_ID : Chat ID where rss links will be sent. If using channel then add channel id.
  • USER_SESSION_STRING : To send rss links from your telegram account instead of adding bot to channel then linking the channel to group to get rss link since bot will not read command from itself or other bot. To generate session string use this command python3 generate_string_session.py after mounting repo folder for sure.
    • RSS NOTE: DATABASE_URL and RSS_CHAT_ID is required, otherwise all rss commands will not work. You must use bot in group. You can add the bot to a channel and add link this channel to group so messages sent by bot to channel will be forwarded to group without using USER_STRING_SESSION.

MEGA

  • MEGA_API_KEY : Mega.nz API key to mirror mega.nz links. Get it from Mega SDK Page
  • MEGA_EMAIL_ID : E-Mail ID used to sign up on mega.nz for using premium account.
  • MEGA_PASSWORD : Password for mega.nz account.

SHORTNER

  • SHORTENER_API : Fill your Shortener API key for multiple seperated by space.
  • SHORTENER : Shortener URL for multiple seperated by space.
    • Supported URL Shorteners:

    exe.io, gplinks.in, shrinkme.io, urlshortx.com, shortzon.com, bit.ly, shorte.st, linkvertise.com , ouo.io, adfoc.us, cutt.ly

CRYPTS

  • SAME_ACC_COOKIES : If using Different Account For Crypts/json set it to False (Deafult is True)
  • GDTOT_CRYPT : Cookie for gdtot google drive link generator. Follow these steps.
  • HUBDRIVE_CRYPT : Cookie for Hubdrive. Follow these steps.
  • KATDRIVE_CRYPT : Cookie for Katdrive. Follow these steps.
  • KOLOP_CRYPT : Cookie for KOLOP + DRIVEHUB. Follow these steps
  • DRIVEFIRE_CRYPT : Cookie for DRIVEFIRE. Follow these steps
  • SHAREDRIVE_PHPCKS : PHPCKS for Sharedrive. Follow these steps.
  • XSRF_TOKEN : For XSRF Token use this chrome extension: Cick here to download
  • laravel_session : For Laravel session use the same extension addressed above: Click here to download

BOT LIMITS

  • TOTAL_TASK_LIMIT : To limit the Total task for the bot at a time. use the int
  • USER_TASKS_LIMIT : To limit the task for users of group at a time. use the int
  • DAILY_TASK_LIMIT : Max task a user can do in one day. use the int
  • STORAGE_THRESHOLD : To leave specific storage free and any download will lead to leave free storage less than this value will be cancelled. Don't add unit. Default unit is GB
  • TORRENT_DIRECT_LIMIT : To limit the size of torrent download. Don't add unit. Default unit is GB
  • ZIP_UNZIP_LIMIT : To limit the size of Zip/Unzip. Don't add unit. Default unit is GB
  • CLONE_LIMIT: To limit the size of Google Drive folder/file which you can clone. Don't add unit. Default unit is GB
  • LEECH_LIMIT : To limit the size of Leeching. Don't add unit. Default unit is GB
  • YTDLP_LIMIT : To limit the size of ytdlp download. Don't add unit. Default unit is GB
  • MAX_PLAYLIST : To limit number of files for ytdlp playlist in leech. use the int
  • MEGA_LIMIT : To limit the size of Mega download. Don't add unit. Default unit is GB
  • DAILY_MIRROR_LIMIT : Max size upto which user can Mirror in one day. Don't add unit. Default unit is GB
  • DAILY_LEECH_LIMIT : Max size upto which user can Leech in one day. Don't add unit. Default unit is GB
  • TIME_GAP : Restrict User for accepting the consecutive link at a time. use the int, Default is -1 means no resctriction

PROGRESS SYMBOLS

  • FINISHED_PROGRESS_STR : Change finish progress bar icon, Default is โ–ˆ
  • UN_FINISHED_PROGRESS_STR : Change unfinish progress bar icon, Default is โ–’
  • MULTI_WORKING_PROGRESS_STR : Must have 7 Different Symbols for Dynamic Progress Bar, Default is โ– โ–‚ โ–ƒ โ–„ โ–… โ–† โ–‡

THEME

  • EMOJI_THEME : Change Theme from simple look to emoji version, Default is False
  • SHOW_LIMITS_IN_STATS : Set it True if you want to show the bot limits in Stats message. Default is False

VIEW STYLE

  • LIST_MODE : List & Seach Result in Telegraph, HTML, Tg_Direct. Default is Telegraph

BRANDING

  • CREDIT_NAME : Replace the Branding of repo with Your Custom name

DYNAMIC IMAGES

  • PICS : Add multiple telgraph(graph.org) image links that are seperated by spaces..
  • WALLFLARE_SEARCH : Put Keyword to Download Images from wallpaperflare.com, Seperate Multiple Words by + instead of space, eg: attack+on+titan
  • WALLTIP_SEARCH : Put Keyword to Download Images from wallpapertip.com, Seperate Multiple Words by - instead of space, eg: attack-on-titan
  • WALLCRAFT_CATEGORY : Put Category Name,
    • Available Category:

    3D, abstract, animals, anime, art, black, cars, city, dark, fantasy, flowers, food, holidays, love, macro, minimalism, motorcycles, music, nature, others, milies, space, sport, technologies, textures, vector, words

  • PIXABAY_API_KEY : Sign Up Pixabay.com and Get API Key to Automatically Add 200 Images in Photos List
  • PIXABAY_CATEGORY : Put Category Name,
    • Available Category:

    backgrounds, fashion, nature, science, education, feelings, health, people, religion, places, animals, industry, computer, food, sports, transportation, travel, buildings, business, music

  • PIXABAY_SEARCH : Put Keyword to Download Images from Pixabay.com Limit : 100 characters

FONT STYLE

  • NAME_FONT : Change the Filename style on Upload message, Available Options : b, code, i, u, strike, spoiler. Default is code
  • CAPTION_FONT : Change the Caption of Leeched files, Available Options : b, code, i, u, strike, spoiler. Default is code

DIFFERENT BOT BUTTONS

  • SAVE_MSG : Save Message Button appear if BOT_PM is False. It directly Save that file in bot. Default is False
  • DISABLE_DRIVE_LINK : Disable drive link button. Default is False
  • VIEW_LINK : View Link button to open file Index Link in browser instead of direct download link, you can figure out if it's compatible with your Index code or not, open any video from you Index and check if its URL ends with ?a=view, if yes make it True, compatible with BhadooIndex Code. Default is False.
  • SOURCE_LINK : View the Source Link button of The mirror or leech link. Default is False
  • START_BTN1_NAME : Change start button one name
  • START_BTN1_URL : add Url of start button one
  • START_BTN2_NAME : Change start button two name
  • START_BTN2_URL : add Url of start button two
  • Some buttons are already added including Drive Link, Index Link, Source Link, Save message, and View Link, you can add extra buttons, if you don't know what are the below entries, simply leave them empty.
    • BUTTON_FOUR_NAME :
    • BUTTON_FOUR_URL :
    • BUTTON_FIVE_NAME :
    • BUTTON_FIVE_URL :
    • BUTTON_SIX_NAME :
    • BUTTON_SIX_URL :

TORRENT SEARCH

  • SEARCH_API_LINK : Search api app link. Get your api from deploying this repository.
    • Supported Sites:

    1337x, Piratebay, Nyaasi, Torlock, Torrent Galaxy, Zooqle, Kickass, Bitsearch, MagnetDL, Libgen, YTS, Limetorrent, TorrentFunk, Glodls, TorrentProject and YourBittorrent

  • SEARCH_LIMIT : Search limit for search api, limit for each site and not overall result limit. Default is zero (Default api limit for each site).
  • SEARCH_PLUGINS : List of qBittorrent search plugins (github raw links). I have added some plugins, you can remove/add plugins as you want. Main Source: qBittorrent Search Plugins (Official/Unofficial).