diff --git a/README.md b/README.md index ff962a0..00191ea 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,9 @@ Get a member's details. ### get_messages() Get all your messages. -### send_message(chat_id, text) -Send a message with content `text` in a specific chat with id `chat_id`. +### send_message(text, user=None, group_uid=None, chat_id=None) +Send a message with content `text`. +Either specify an existing `chat_id`, or both `user` and `group_uid` for a new chat. ## Example scripts diff --git a/spond/spond.py b/spond/spond.py index eeafd12..d342f3e 100644 --- a/spond/spond.py +++ b/spond/spond.py @@ -162,7 +162,10 @@ async def _continue_chat(self, chat_id, text): async def send_message(self, text, user=None, group_uid=None, chat_id=None): """ - Starts a new chat or continue old one. + Start a new chat or continue an existing one. + + If `chat_id`of an existing chat is specified, message continues that chat. + Otherwise, both `user` and `group_uid` must be specified, and the message starts a new chat. Parameters ----------