Add example of replying to a message

This commit is contained in:
Mads Marquart
2020-06-07 14:41:05 +02:00
parent 8824a1c253
commit 65b42e6532

View File

@@ -116,8 +116,14 @@ class ThreadABC(metaclass=abc.ABCMeta):
reply_to_id: Optional message to reply to reply_to_id: Optional message to reply to
Example: Example:
Send a message with a mention to a thread.
>>> mention = fbchat.Mention(thread_id="1234", offset=5, length=2) >>> mention = fbchat.Mention(thread_id="1234", offset=5, length=2)
>>> thread.send_text("A message", mentions=[mention]) >>> message_id = thread.send_text("A message", mentions=[mention])
Reply to the message.
>>> thread.send_text("A reply", reply_to_id=message_id)
Returns: Returns:
The sent message The sent message