From 65b42e65323de2fedeb424792e9511fdb0e7bf66 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 7 Jun 2020 14:41:05 +0200 Subject: [PATCH] Add example of replying to a message --- fbchat/_threads/_abc.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fbchat/_threads/_abc.py b/fbchat/_threads/_abc.py index 60a5dd0..8fb4266 100644 --- a/fbchat/_threads/_abc.py +++ b/fbchat/_threads/_abc.py @@ -116,8 +116,14 @@ class ThreadABC(metaclass=abc.ABCMeta): reply_to_id: Optional message to reply to Example: + Send a message with a mention to a thread. + >>> 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: The sent message