Skip to content

Commit

Permalink
Merge pull request #92 from elliot-100/91-in-readme-send_message-sign…
Browse files Browse the repository at this point in the history
…ature-doesnt-reflect-changes-made-in-0990

Update `send_message()` README documentation to reflect ability to start a new chat
  • Loading branch information
Olen authored Sep 18, 2023
2 parents ec08718 + 893853f commit 781b721
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion spond/spond.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down

0 comments on commit 781b721

Please sign in to comment.