Skip to content

Commit

Permalink
Update send_message() signature in README; description in README an…
Browse files Browse the repository at this point in the history
…d docstring
  • Loading branch information
elliot-100 committed Sep 14, 2023
1 parent ec08718 commit 893853f
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 893853f

Please sign in to comment.