From e0c8583b2d592d5b6668fea1ba0d7b4ffcba5600 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Wed, 13 Jan 2021 14:30:46 +0100 Subject: [PATCH] Rename to use source (and fix typo) --- README.md | 4 ++-- xbotlib.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b3b7274..31ae686 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,8 @@ accepts a `message` argument. Attributes: - **body**: the body of the message -- **sender**: the sender of the message -- **receive**: the receive of the message +- **source**: where the message came from (can be a user or a room) +- **receiver**: the receiver of the message - **nickname**: the nickname of the sender - **type**: the type of message (`chat` or `groupchat`) diff --git a/xbotlib.py b/xbotlib.py index 10b6f17..65d873a 100644 --- a/xbotlib.py +++ b/xbotlib.py @@ -21,7 +21,7 @@ class SimpleMessage: return self.message["body"] @property - def sender(self): + def source(self): return self.message["from"].bare @property