A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
#!/bin/sh | |
if [ $# -ne 1 ] | |
then | |
echo take port number as argument | |
exit 1 | |
fi | |
apt update && apt install -y git curl build-essential libssl-dev zlib1g-dev |
You must ensure that you have Telethon installed. Run pip install telethon
to install.
[optional]
You can can create file called .env
in the directory from which you are running the script.
.env
First of all you make a bot whose multiple instances are to be run from the same server.
Suppose the bot is run by invoking main.py
with the bot_name
and token
as command line arguments.
Syntax:
[PYTHON] [ENTRY_POINT] [bot_name] [token]
Example:
python main.py mysamplebot "173453434:42jhs894_13234jsjgasjs"
apt-get update && apt-get upgrade -y | |
apt install wget curl git zsh -y | |
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
apt install python3.9 python3.9-venv python3-pip -y | |
python3.9 -m pip install --upgrade pip | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 2 | |
pip install pipx | |
pipx ensurepath | |
pipx install poetry |