mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-19 16:12:30 +00:00
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:
parent
f9d404618b
commit
589792f41e
@ -179,9 +179,11 @@ def get_approved(channel: str) -> list[str]:
|
|||||||
def format_pairing_reply(code: str) -> str:
|
def format_pairing_reply(code: str) -> str:
|
||||||
"""Return the pairing-code message sent to unrecognised DM senders."""
|
"""Return the pairing-code message sent to unrecognised DM senders."""
|
||||||
return (
|
return (
|
||||||
"This assistant requires approval before it can respond.\n"
|
"Hi there! This assistant only responds to approved users.\n\n"
|
||||||
f"Your pairing code is: `{code}`\n"
|
f"Your pairing code is: `{code}`\n\n"
|
||||||
f"Ask the owner to run: `nanobot pairing approve {code}`"
|
"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}`"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user