feat(pairing): friendlier pairing reply with slash command hint

Update format_pairing_reply() to be more conversational and explicitly
mention both ways an owner can approve:
- In-chat: /pairing approve <code>
- CLI: nanobot pairing approve <code>
This commit is contained in:
chengyongru 2026-05-14 13:42:24 +08:00 committed by Xubin Ren
parent f9d404618b
commit 589792f41e

View File

@ -179,9 +179,11 @@ def get_approved(channel: str) -> list[str]:
def format_pairing_reply(code: str) -> str:
"""Return the pairing-code message sent to unrecognised DM senders."""
return (
"This assistant requires approval before it can respond.\n"
f"Your pairing code is: `{code}`\n"
f"Ask the owner to run: `nanobot pairing approve {code}`"
"Hi there! This assistant only responds to approved users.\n\n"
f"Your pairing code is: `{code}`\n\n"
"To get access, ask the owner to approve this code:\n"
f"- In this chat: send `/pairing approve {code}`\n"
f"- Via CLI: run `nanobot pairing approve {code}`"
)