diff --git a/README.md b/README.md index e3fb191..7660195 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Make sure you have this information right now: - bot url (wss://your-snek-instance.com/rpc.ws) #### Create a file -Open a file ending with the `.py` extension and pase this content. +Open a file ending with the `.py` extension and paste this content. Replace the authentication details on the bottom lines with the one of the account you just created. ```python import asyncio @@ -120,6 +120,6 @@ The `ExampleBot` class inherits from a base `Bot` class and implements several e - `on_own_message`: Logs messages sent by the bot itself. - `on_mention`: Handles mentions; if "source" is in the message, it replies with its own source code, with sensitive data disguised. - `on_message`: Responds to "hello" and "bye" messages if the bot has joined the channel. -The bot will be instantiated and runs asynchronously. +The bot will be instantiated and runs asynchronously. It will survive server deploys and network outages. If such issue occurs, it will try to reconnect within a second like nothing happened. It's production ready. diff --git a/example.py b/example.py index 74fc2a8..1fa229f 100644 --- a/example.py +++ b/example.py @@ -67,5 +67,5 @@ class ExampleBot(Bot): await self.send_message(channel_uid, result) -bot = ExampleBot(url="ws://snek.molodetz.nl/rpc.ws", username="example", password="example") +bot = ExampleBot(url="ws://snek.molodetz.nl/rpc.ws", username="example", password="xxxxxx") asyncio.run(bot.run())