userbotindo / caligo

SelfBot for Telegram
56 stars 80 forks source link
asyncio bot heroku pyrogram telegram-bot telegram-selfbot telegram-userbot

Caligo

A SelfBot for Telegram made with Python using Pyrogram library. It's highly inspired from pyrobud that writtens in Telethon library. It's the same but different, you know what i mean?

Caligo needs Python 3.9 or newer to run.

Compatibility

Caligo should work with all Linux-based operating systems.

This program tested partially on MacOs M1 and not officially support for windows.

Installation

Caligo uses MongoDB Atlas for it database, you can get it free at https://www.mongodb.com/ and save the uri for use on config and to generate your session.

Obviously you need git, and it should be already installed on major operating systems linux based.

Local

First, clone this Git repository locally: git clone https://github.com/userbotindo/caligo

After that, you can run python3 -m pip install . to install the bot along with the depencies.

Once it's installed, you can choose to invoke it using the caligo command, or run the bot in-place (which is described later in the Usage section). Running it in-place is recommended to allow for automatic updates via Git.

Error: Directory '.' is not installable. File 'setup.py' not found.

This common error is caused by an outdated version of pip. We use the Poetry package manager to make things easier to maintain, which works with pip through PEP-517. This is a relatively new standard, so a newer version of pip is necessary to make it work.

Upgrade to pip 19 to fix this issue: pip3 install -U pip

Using Heroku

Config Gist

Deploying

Generating Session

Heroku

Click more on your app page and the click Run console and run this command python3 generate_session.py. Fill the API_ID, API_HASH and MONGODB URI when it asked and wait until it finished and your userbot is ready.

Local

Just run the bot normally.

Configuration

Copy sample_config.toml to config.toml and edit the settings as desired. Each and every setting is documented by the comments above it.

Obtain the API ID and API HASH from Telegram's website. TREAT THESE SECRETS LIKE A PASSWORD!

Obtain the DB_URI from MongoDB. TREAT THIS SECRETS LIKE A PASSWORD!

Configuration must be complete before starting the bot for the first time for it to work properly.

Usage

To start the bot, type python3 main.py or python3 -m caligo if you are running it in-place or use command corresponding to your chosen installation method above.

Support

Feel free to join the official support group on Telegram for help or general discussion regarding the bot. You may also open an issue on GitHub for bugs, suggestions, or anything else relevant to the project.