fix: delete item keyerror #91

This commit is contained in:
Terry Geng
2020-03-08 09:26:36 +08:00
parent da6b028e2c
commit e10059a76e
6 changed files with 30 additions and 22 deletions

View File

@ -86,7 +86,8 @@ class BaseItem:
return ""
def send_client_message(self, msg):
self.bot.send_msg(msg)
if self.bot:
self.bot.send_msg(msg)
def to_dict(self):
return {"type" : "base", "id": self.id, "ready": self.ready, "path": self.path, "tags": self.tags}