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"
Now the multi_bot.py
script runs multiple instances of the bot code in seperate screen
sessions/sockets.
(each socket is named after the name of the bot running inside it)
The bots.yml
file supplies the list of bot accounts with their tokens to multi_bot.py
Syntax of bots.yml
botusername: "bottoken"
anotherbotname: "anothertoken"
Example:
mysamplehorriblebot: "173453434:42jhs894_13234jsjgasjs"
anotherSamplebot: "556453434:42jhs894_13234yuweeerasjs"
Learning the screen command