From cc5a342f91d79aa2c34b096a65c40799b713cf20 Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 20 Sep 2016 20:47:40 +0000 Subject: [PATCH] Add documentation --- yaboli/botmanager.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/yaboli/botmanager.py b/yaboli/botmanager.py index 06030ee..443761e 100644 --- a/yaboli/botmanager.py +++ b/yaboli/botmanager.py @@ -10,12 +10,22 @@ class BotManager: """ Keep track of multiple bots in different rooms. Save and load bots from a file. + + If you've created a bot from the Bot class, you can easily host it by adding: + + if __name__ == "__main__": + manager = BotManager(YourBotClass, bot_limit=10) + manager.interactive() + + to your file and then executing it. """ def __init__(self, bot_class, bot_limit=None): """ - + bot_class - bot class you want to run + bot_limit - maximum amount of bots to exist simultaneously """ + self.bot_class = bot_class self.bot_limit = bot_limit self.bot_id_counter = 0 # no two bots can have the same id