Pass created_in and created_by as arguments instead of setting them after creation
This commit is contained in:
parent
76b88fb1e7
commit
c6bddec530
2 changed files with 2 additions and 2 deletions
|
|
@ -459,7 +459,7 @@ class Bot():
|
|||
password = None
|
||||
|
||||
try:
|
||||
bot = self.manager.create(room, password=password, created_in=self.roomname(),
|
||||
self.manager.create(room, password=password, created_in=self.roomname(),
|
||||
created_by=message.sender.name)
|
||||
except exceptions.CreateBotException:
|
||||
self.room.send_message("Bot could not be cloned.", parent=message.id)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class BotManager():
|
|||
raise exceptions.CreateBotException("max_bots limit hit")
|
||||
else:
|
||||
bot = self.bot_class(room, nick=nick, password=password, manager=self,
|
||||
created_in=None, created_by=None)
|
||||
created_in=created_in, created_by=created_by)
|
||||
self._bots[self._bot_id] = bot
|
||||
self._bot_id += 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue