Skip to content

Modification

Sunil Kumar edited this page Sep 21, 2021 · 10 revisions

Notice - Modification Guide Only Works On Archive Branch As Of Now.Use Archive Branch If U Wanna Do Modification.

A Guide On How To Customise Bot Further for Personal Use.

  1. Customising Bot /start Message
  2. Changing Bot Commands
  3. Changing Max Allowed Downloads & Set Auto Cancel Time If No Seeders Available
  4. Customising Bot Message When Bot Auto Cancels the Torrent Due to No Seeders are Available
  5. Customising Bot Stats Message
  6. Customising Mirror Status
  7. Customising Mirror Progress Bar
  8. Customising Bot status Message
  9. Customising Bot After Download Complete Message

Customising Bot /start Message

:octocat: In Order to Customise Bot Start Message You have to Edit few lines in __main__.py file.

You Can Find __main__.py File Here โฌ‡๏ธ

MirrorX/bot/__main__.py
or
https://github.com/iamLiquidX/MirrorX/blob/master/bot/__main__.py

In Order to Customise the way you want the start Message of Bot, modify line 46 & line 47 from __main__.py file

๐Ÿ”— Line 46 can be Opened from here

start Message

Example :

Below is the Just an Example of How I Customised start message of my Bot. This is Just to Give you an Idea, You can Customise as You like.

final start Message

Changing Bot Commands

:octocat: In Order to Customise Bot Commands, You have to Edit Commands in bot_commands.py File. You Can Find bot_commands.py File Here โฌ‡๏ธ

MirrorX/bot/helper/telegram_helper/bot_commands.py
or
https://github.com/iamLiquidX/MirrorX/blob/master/bot/helper/telegram_helper/bot_commands.py

Example :

I Changed My Bot Commands Like Following. You Can easily understand by looking at & edit as you want them.

Bot_Commands

Changing Max Allowed Downloads and Set Auto Cancel Time If No Seeders Available

:octocat: In Order to Change Max Allowable Torrents at a Time & Auto Cancel If No Seeders are Available, You Have to Edit aria.sh file

Max Allowed Downloads

You can limit maximum concurrent downloads by changing the value of MAX_CONCURRENT_DOWNLOADS in aria.sh file. By default, it's set to 7

Auto Cancel a Torrent

You can Set the Bot to Auto Cancel a Torrent, If No Seeders are Available by changing the value of --bt-stop-timeout in aria.sh file. By default, it's set to 1200. ( It means after 1200 Seconds, Torrent will get Auto Cancelled)

If You Don't want the Bot To Auto Cancel The Torrent If No Seeders Availabe

You Have to remove --bt-stop-timeout=1200 from Line 17 in aria.sh file.

๐Ÿ”— Line 17 Can be Opened from Here

See the Below Image and Remove the High Lighted Text from aria.sh

no auto cancel

Customising Bot Message When Bot Auto Cancels the Torrent Due to No Seeders are Available

:octocat: In Order to edit Bot Auto Cancel Message, You Have to Edit aria2_download.py file.

You Can Find the aria2_download.py file Here โฌ‡๏ธ

MirrorX/bot/helper/mirror_utils/download_utils/aria2_download.py
or
https://github.com/iamLiquidX/MirrorX/blob/master/bot/helper/mirror_utils/download_utils/aria2_download.py

The Line Which You Have to Edit is Line 65 ๐Ÿ”— Line 65 can be opened from here

Example:

This is How I Modified Auto Cancel Message. You Can Modify as You Like.

๐˜๐จ๐ฎ๐ซ ๐“๐จ๐ซ๐ซ๐ž๐ง๐ญ ๐‡๐š๐ฌ ๐๐จ ๐’๐ž๐ž๐๐ฌ, โš ๏ธ ๐ƒ๐ž๐š๐ ๐“๐จ๐ซ๐ซ๐ž๐ง๐ญ !

Auto cancel

Customising Bot Stats Message

:octocat: In Order to Customise stats Message, You have to Edit few lines in __main__.py file.

You Can Find __main__.py File Here โฌ‡๏ธ

MirrorX/bot/__main__.py
or
https://github.com/iamLiquidX/MirrorX/blob/master/bot/__main__.py

The Lines Which You Have to Edit are from Line 31 to Line 39 . You can Customise the emojis and Words .

Note: Don't Change Anything Which is written in { } , Unless you know what you are doing.

๐Ÿ”— Line 31 to 39 can be opened from here

stats message

Customising Mirror Status

:octocat: In Order To Customise MirrorStatus, You Have to Edit Line 17 to Line 23 in bot_utils.py file. You Can Find bot_utils.py File Here โฌ‡๏ธ

MirrorX/bot/helper/ext_utils/bot_utils.py
or
https://github.com/iamLiquidX/MirrorX/blob/master/bot/helper/ext_utils/bot_utils.py

๐Ÿ”— Line 17 to 23 can be opened from here

MirrorStatus

Customising Mirror Progress Bar

:octocat: In Order To Customise Mirror Progress Bar, You Have to Edit Line 27 ,Line 84 & Line 87 in bot_utils.py file. You Can Find bot_utils.py File Here โฌ‡๏ธ

MirrorX/bot/helper/ext_utils/bot_utils.py
or
https://github.com/iamLiquidX/MirrorX/blob/master/bot/helper/ext_utils/bot_utils.py

๐Ÿ”— Line 27 In Line 27 Replace โ–“ with the character of your Choice. This Character is Seen When Download Completes.

๐Ÿ”— Line 84 In Line 84 Replace โ–“ with the character of your Choice. This Character will Indicate the Downloaded Part.

๐Ÿ”— Line 87 In Line 84 Replace โ–‘ with the character of your Choice. This Character Will Indicate the Incomplete Download Part

Progress Bar

Customising Bot status Message

:octocat: In Order To Customise Bot status Message, You Have to Edit Line 96 to Line 112 in bot_utils.py file.

You Can Find bot_utils.py File Here โฌ‡๏ธ

MirrorX/bot/helper/ext_utils/bot_utils.py
or
https://github.com/iamLiquidX/MirrorX/blob/master/bot/helper/ext_utils/bot_utils.py

Note: Don't Change Anything Which is written in { } , Unless you know what you are doing.

Bot Status Message

Example : This Is How It Looks โฌ‡๏ธ

botstatus

Customising Bot After Download Complete Message

:octocat: In Order To Customise Bots Message after Downnload Complete, You Have to Edit Line 149 to Line 177 in mirror.py file. You Can Find mirror.py File Here โฌ‡๏ธ

MirrorX/bot/modules/mirror.py
or
https://github.com/iamLiquidX/MirrorX/blob/master/bot/modules/mirror.py

๐Ÿ”— Line 149

mirror.py

This Is an Example, How I Edited Mine โฌ‡๏ธ

mirror.py edited

Output of Edited Mirror.py file from Bot Message

mirror.py output

This is Just a Small Guide using which small small Customisations can be made in Mirror Bot.

I Hope It is Helpful to Beginners.

If I Missed any Part, You can request for that.