- summary: Sends a private message to one player, addressed either by character name or by account tag.
- area: Game.Chat
Sends a private message to one player, addressed either by character name or by account tag.
Kind request · Area Game.Chat
Talks to one player rather than a channel.
THE RECIPIENT IS A ONEOF - SET EXACTLY ONE BRANCH. name addresses a CHARACTER
by its displayed name; tag addresses an ACCOUNT by its tag, which is a name
plus a numeric discriminator and reaches the person whichever character they are
playing. Setting neither sends a whisper to nobody; the message is not rejected
for it.
content is the text. It is the singular string that is NOT inside the oneof -
worth saying, because the name branch is also a string.
metadata carries the same rich attachments as a channel line; see
Metadata.
UNSOLICITED WHISPERS ARE THE FASTEST WAY TO GET A SCRIPT REPORTED. Whatever you do here is read by a human on the other end.
When you may send it
- Requires
character_loadedobserved - Raised by: the player sends a private message from the chat window observed
Related messages
- You will receive one of
ChatPrivateCopyMessageEventinferred — the server echoes the whisper back to the sender with the recipient's name and id; the client prints it as your side of the conversation - You will receive one of
ChatErrorEventinferred — instead of the echo when the server refuses the line (unknown recipient, channel unavailable, ...)
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 1 | metadata | Metadata | Rich content attached to the whisper. See Metadata. Beta called this field object.Name ours, after its type Metadata: beta has no such field and no build names it. | optional |
| 2 | content | string | The text to whisper. The singular string outside the target oneof. | required |
| 3 | tag | AccountTag | The recipient, addressed by account tag - a name plus its numeric discriminator. Reaches the account rather than one character. | one of the two target branches |
| 5 | name | string | The recipient, addressed by character name. | one of the two target branches |