Skip to content

Commit 6d76792

Browse files
author
Corina Gum
committed
Update examples
1 parent 66046fb commit 6d76792

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

examples/quoted-replies/src/main.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,36 +48,38 @@ async def handle_message(ctx: ActivityContext[MessageActivity]):
4848
# reply() — auto-quotes the inbound message
4949
# ============================================
5050
if "test reply" in text:
51-
await ctx.reply("This reply auto-quotes your message using reply()")
51+
await ctx.reply("Thanks for your message! This reply auto-quotes it using reply().")
5252
return
5353

5454
# ============================================
5555
# quote_reply() — quote a previously sent message by ID
5656
# ============================================
5757
if "test quote" in text:
58-
sent = await ctx.send("This message will be quoted next...")
59-
await ctx.quote_reply(sent.id, "This quotes the message above using quote_reply()")
58+
sent = await ctx.send("The meeting has been moved to 3 PM tomorrow.")
59+
await ctx.quote_reply(sent.id, "Just to confirm — does the new time work for everyone?")
6060
return
6161

6262
# ============================================
6363
# add_quoted_reply() — builder with response
6464
# ============================================
6565
if "test add" in text:
66-
sent = await ctx.send("This message will be quoted next...")
67-
msg = MessageActivityInput().add_quoted_reply(sent.id, "This uses add_quoted_reply() with a response")
66+
sent = await ctx.send("Please review the latest PR before end of day.")
67+
msg = MessageActivityInput().add_quoted_reply(sent.id, "Done! Left my comments on the PR.")
6868
await ctx.send(msg)
6969
return
7070

7171
# ============================================
72-
# Multi-quote interleaved
72+
# Multi-quote with mixed responses
7373
# ============================================
7474
if "test multi" in text:
75-
sent_a = await ctx.send("Message A — will be quoted")
76-
sent_b = await ctx.send("Message B — will be quoted")
75+
sent_a = await ctx.send("We need to update the API docs before launch.")
76+
sent_b = await ctx.send("The design mockups are ready for review.")
77+
sent_c = await ctx.send("CI pipeline is green on main.")
7778
msg = (
7879
MessageActivityInput()
79-
.add_quoted_reply(sent_a.id, "Response to A")
80-
.add_quoted_reply(sent_b.id, "Response to B")
80+
.add_quoted_reply(sent_a.id, "I can take the docs — will have a draft by Thursday.")
81+
.add_quoted_reply(sent_b.id, "Looks great, approved!")
82+
.add_quoted_reply(sent_c.id)
8183
)
8284
await ctx.send(msg)
8385
return
@@ -86,8 +88,8 @@ async def handle_message(ctx: ActivityContext[MessageActivity]):
8688
# add_quoted_reply() + add_text() — manual control
8789
# ============================================
8890
if "test manual" in text:
89-
sent = await ctx.send("This message will be quoted next...")
90-
msg = MessageActivityInput().add_quoted_reply(sent.id).add_text(" Custom text after the quote placeholder")
91+
sent = await ctx.send("Deployment to staging is complete.")
92+
msg = MessageActivityInput().add_quoted_reply(sent.id).add_text(" Verified — all smoke tests passing.")
9193
await ctx.send(msg)
9294
return
9395

@@ -101,7 +103,7 @@ async def handle_message(ctx: ActivityContext[MessageActivity]):
101103
"- `test reply` - reply() auto-quotes your message\n"
102104
"- `test quote` - quote_reply() quotes a previously sent message\n"
103105
"- `test add` - add_quoted_reply() builder with response\n"
104-
"- `test multi` - Multi-quote interleaved (quotes two separate messages)\n"
106+
"- `test multi` - Multi-quote with mixed responses (one bare quote with no response)\n"
105107
"- `test manual` - add_quoted_reply() + add_text() manual control\n\n"
106108
"Quote any message to me to see the parsed metadata!"
107109
)

0 commit comments

Comments
 (0)