From b45dfaf480fec79dfb8f171216a3bd790136a095 Mon Sep 17 00:00:00 2001 From: Dax <23448388+fndax@users.noreply.github.com> Date: Mon, 20 Apr 2020 01:20:08 +0000 Subject: [PATCH] Add Bot parameters when creating Server objects in examples --- examples/factoids.py | 6 +++--- examples/sasl.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/factoids.py b/examples/factoids.py index cc80729..75a1c01 100644 --- a/examples/factoids.py +++ b/examples/factoids.py @@ -62,8 +62,8 @@ class Database: del self._settings[setting] class Server(BaseServer): - def __init__(self, name: str, channel: str, database: Database): - super().__init__(name) + def __init__(self, bot: Bot, name: str, channel: str, database: Database): + super().__init__(bot, name) self._channel = channel self._database = database @@ -146,7 +146,7 @@ class Bot(BaseBot): super().__init__() self._channel = channel def create_server(self, name: str): - return Server(name, self._channel, Database()) + return Server(self, name, self._channel, Database()) async def main(hostname: str, channel: str, nickname: str): bot = Bot(channel) diff --git a/examples/sasl.py b/examples/sasl.py index d826a47..e8e9818 100644 --- a/examples/sasl.py +++ b/examples/sasl.py @@ -13,7 +13,7 @@ class Server(BaseServer): class Bot(BaseBot): def create_server(self, name: str): - return Server(name) + return Server(self, name) async def main(): bot = Bot()