Clonebot-UI Help

Clonebot-UI Help



" ๐™„ ๐™˜๐™–๐™ฃ ๐™˜๐™ก๐™ค๐™ฃ๐™š ๐™–๐™ฃ๐™ฎ๐™ฉ๐™๐™ž๐™ฃ๐™œ, ๐™›๐™ง๐™ค๐™ข ๐™–๐™ฃ๐™ฎ๐™ฌ๐™๐™š๐™ง๐™š ๐™ฉ๐™ค ๐™ฎ๐™ค๐™ช๐™ง ๐™ฅ๐™š๐™ง๐™จ๐™ค๐™ฃ๐™–๐™ก ๐™˜๐™๐™–๐™ฉย .. ๐™€๐™ซ๐™š๐™ฃ ๐™ž๐™ฉ'๐™จ ๐™– ๐™ฅ๐™ง๐™ž๐™ซ๐™–๐™ฉ๐™š ๐™ค๐™ง ๐™ฅ๐™ช๐™—๐™ก๐™ž๐™˜ ๐™˜๐™๐™–๐™ฉ, ๐™ž ๐™™๐™ค๐™ฃ'๐™ฉ ๐™˜๐™–๐™ง๐™š "




โ˜› Supported media: Document, Video, Audio, Photo, and Voice


Features :

โ˜› Anonymous cloning from any chats.

โ˜› Supports private and public chats.


โ˜› Bot won't copy duplicate files:

โ˜› The bot will check the file indexes in the target chat at first ( Can be canceled)

โ˜› Duplicate files found in the target chat can be purged on completion.

โ˜› Bot will save the index of the same to a CSV file for future references.

โ˜› If target chat is used for the second time, bot will load the index from CSV.

โ˜› This will be used to avoid repeated checking of target chat.

โ˜› The newly cloned file index is also updated in the CSV.

โ˜› Once indexing is done successfully, bot won't clone duplicate files.

โ˜› It is recommended to complete the target chat when in the first time usage.

โ˜› All the stored CSV indexes can be removed by selecting the 'Reset' button.


โ˜› Supports all types of chat information to configure.

Id, Username, Invite links: -100 not required in Ids.

โ˜› Supports selection of media types included.

โ˜› Real-time checking of chat ids as self.

โ˜› Bot doesn't need to be a member of chats.

โ˜› Session user doesn't need to be an admin of the source.

โ˜› Clone media with or without the caption.

โ˜› Supports clone from-to message-ids.

โ˜› The filename can be set as the caption.

โ˜› Authorized Users to the bot

โ˜› Duplicate file clone filter

โ˜› Fast and slow modes of operation.

โ˜› No commands are needed to configure.

โ˜› Real-time updating of msg ids with the chat inputs.

โ˜› Visual update of the process graphically.

โ˜› UI - button and database-based design.

โ˜› Informative UI with all updates.

โ˜› Session protection:

Session user can Terminate the bot execution by clicking the button. This feature is included to avoid unauthorized usage of anyone's session is being used anonymously. Some of the string session generating bots are doing as. When the bot is deployed, the bot will immediately respond to the same by sending a message in the session user's account. By clicking the button and blocking the bot will lead to the deployment of the string again in the bot. Don't ever generate a user session string by bots!


Requirements: [ String session user ]

โ˜› Must be a member of source chat.

โ˜› Must be an admin to be the target chat.


Mandatory Variables:

TG_BOT_TOKEN    - Get from @BotFather


APP_ID          - Get from my.telegram.org


API_HASH        - Get from my.telegram.org


TG_USER_SESSION - Run any userbot session maker


DB_URI = os.environ.get("DATABASE_URL", "")


AUTH_USERS = []

Note:

โ˜› For Heroku, just leave the DB_URI field as the above. for Linux servers or VPS, you need to create a database first. Detailed steps are described in the below section.

โ˜› A user session string can be generated from HERE

(Generate a session string from a user account, not from a bot account)


Procedure:

โ˜› Deploy the bot with THIS link to Heroku.

For Linux servers, Please see the bottom of this doc.

โ˜› Join the source chat as a user.

For public chats, the user doesn't need to be in:

Use username instead of id in this case.

โ˜› Join the target chat as admin.

Posting privileges are mandatory.

-------------------------------------------------------------------------

โ˜› Select the type of files to be cloned ( Do this first to calculate the last message id - automatically )

โ˜› Add source & target chat info to the bot.

โ˜› Add the starting & ending message-ids [Optional]

โ˜› Select the options : [ Optional ]

Delayed - Cloning with delay (Slow mode).

Caption - Turn off "caption" in cloned media.

File Caption - Turn on file name as "caption".

View - View the stored user configuration.

Type - To select the file types to clone.

Reset - Reset all the stored user inputs to bot defaults.

โ˜› Finally, Clone to clone media without forwarding tag.

โ˜› To cancel the process, opt button.


You can see the repo HERE

You can deploy the repo from HERE to Heroku.


In Linux servers or VPS: Please follow the steps:

From this update, the clonebot-UI repo needs a database. So, you'll need to have a database installed on your system. I personally use Postgres, so I recommend using it for optimal compatibility.

In the case of Postgres, this is how you would set up a database on a Debian/Ubuntu system. Other distributions may vary.


  1. Open terminal as superuser
sudo su


2. Install PostgreSQL database:

sudo apt-get update && sudo apt-get install postgresql


3. Change to the Postgres user:

sudo su - postgres


4. Create a new database user :

(change YOUR_USER appropriately)

createuser -P -s -e YOUR_USER_NAME


5. This will be followed by you need to input your password


6. Create a new database table:

createdb -O YOUR_USER YOUR_DB_NAME


7. Create the database with your own values :

Change YOUR_USER and YOUR_DB_NAME appropriately.

psql YOUR_DB_NAME -h YOUR_HOST YOUR_USER


This will allow you to connect to your database via your terminal. By default, YOUR_HOST should be localhost:5432

You should now be able to build your database URI. This will be:

sqldbtype://username:pw@hostname:port/db_name


8. An example database URI could be like:

postgresql://johnson:1234@localhost:5432/clonebotdb


Replace sqldb type with whichever dB you're using (eg postgresql, mysql, sqllite, etc) repeat for your username, password, hostname (localhost?), port (5432?), and db name.


9. Createย config.pyย  in the main directory:

With mandatory variables andย database URI. Refer sample.config or rename it as config.py with your own variables.


Open the main bot directory > right-click > open a terminal here >

Or

Open a terminal > change to the bot main directory by cd /xxx/xxx


10. Finally, Run the following in the Terminal:

virtualenv -p python3 venv
. ./venv/bin/activate
pip3 install -r requirements.txt
python3 main.py


If everything worked fine, the string session user has a message in his bot ๐Ÿ˜œ


Errors may get:

  1. Progress Failed to display: When you add a source chat, the bot will automatically find out the last message-id with the supported media types of that chat. In some cases like chats having limitations due to Copywrite infringement or pornography, bot will unable to retrieve the same. So the absence of the last message-id, the bot will fail to calculate the percentage completed and the process history, unless you need to input the same at initial. To avoid the situation, kindly 'VIEW' all fields where okay before beginning the clone.
  2. Errors in % or Process bar: Case-1: This basically occurs when asynchronous message-ids were inserted in starting & ending fields. The bot is calculating the percentage with the value inserted by the user. (Eg: the user inserted an end message id 30 and continued the process. But when in execution, the selected type is ended at message id 28 will cause the percentage is struck in 90% even when the process has successfully completed). So, before inserting an end id of a specific type, be sure that the type exists in that id. Case-2: Bot will automatically set the last message id when a source chat id is added. This will be done according to the presently supported file type defaults in the bot. After you select the file types and go for a clone, bot will unable to find the last message id depends upon your selection, resulting in errors in percentage. So select filetypes first, then add source.[ Even when in some conditions, the bot will unable to set it right. For a better visual experience, add the last message id manually if doesn't show in VIEW. If you are not selecting any file types, it will be fine at most ]
  3. Bot is blocked by the session user: This is a protective mechanism to avoid unauthorized usage of someone's user session string. When a bot like this is deployed somewhere, the session user will send a message in the bot with some text as self. If someone stole a session string and deployed the bot, the session user can find it in this way, and running the command /terminate in the bot can terminate the session[Session user only]. After blocking the bot by the session user, will lead to the error message will be printed in the deploy console, every time when tried to deploy with the same bot with the same string. There will be a confirmation for the above command before it takes action. [Heroku will restart the session within 10sec after a session termination, so, the blocking should be done within the time period].
  4. Any execution errors: Most people use free dynos of Heroku. Free Heroku dynos will restart every 24Hr time, which can cause a break in continuing clone and misbehave of the bot. I personally recommend using any VPS to do such lengthy jobs as!


  1. LICENCE
  2. CREDITS
  3. DEVELOPER
  4. DISCLAIMER

Join My Update Channel ๐Ÿ‘‰ https://t.me/RMProjects

Report Page