What a wisp hears
Your wisp’s line follows one group, its own, and Woosh puts into it exactly what the grants of
every server it is in allow (with slices, each line hears its share of the servers).
The events are the ones the apps hear, with the same names and keys, and two differences: a
channel’s events carry server first, since your wisp is in many servers, and a member
carries no presence or activity. A grant taken away takes its events with it at once: nothing
outside a grant ever reaches your line.
Always
Section titled “Always”Whatever it was granted, a wisp hears what concerns itself:
| Event | When |
|---|---|
command |
a person ran one of its commands, where it has commands (Commands) |
act |
a person pressed something on one of its cards, or sent one of its forms (Presses and private cards, Forms) |
server with new, then grants |
it was added to a server |
grants |
an admin saved a change to its grant there, a channel its grant named was deleted, or your wisp stopped asking for something it had. It may be the same grant again: always take it as the grant as it stands now |
server.gone |
it is out of a server: removed by an admin, kicked, banned, or the server deleted |
| Event | d |
|---|---|
server |
id, name, icon?, owner, unread? (mark when its members see marks rather than counts for what they have not read), new?: the server alone |
grants |
server, hears?, does?, everywhere? or channels?, permissions? |
server.gone |
id, why, name? (the server’s name; left out when deleted) |
Added to Saturday Squad:
{ "c": 61, "n": 106, "t": "server", "d": { "id": "5c3b1a2d-8e4f-4a6b-9c7d-0e1f2a3b4c55", "name": "Saturday Squad!", "owner": "3f1c9a52-6d1e-4c8b-9a51-2b7e0c4d8f11", "new": true }}and right after it, what the admin granted there: the server’s shape and the lines of
#general, to post and offer commands there, and for its role, to manage messages:
{ "c": 61, "n": 107, "t": "grants", "d": { "server": "5c3b1a2d-8e4f-4a6b-9c7d-0e1f2a3b4c55", "hears": ["shape", "messages"], "does": ["post", "commands"], "channels": ["6d4c2b3e-9f5a-4b7c-8d6e-1f2a3b4c5d66"], "permissions": ["manageMessages"] }}grants is whole every time, so keep the last one per server and replace it with the next:
hearsanddoeslist what your wisp has there. Left out: none.- Where it works is always said, one of two ways:
everywhereistruefor every channel, locked and hidden ones too, and those made later; otherwisechannelsnames the channels. channelscan be empty. That happens when every channel it named was deleted: your wisp works in no channel there until an admin picks again. It never means every channel.permissionsnames its server permissions there, in the order of their bits. Left out: none. They sit on the role made for your wisp (Permissions).
Later, an admin let it react as well, everywhere, and took its role’s permissions away:
{"c":61,"n":120,"t":"grants","d":{"server":"5c3b1a2d-8e4f-4a6b-9c7d-0e1f2a3b4c55","hears":["shape","messages"],"does":["post","react","commands"],"everywhere":true}}Later still, an admin gave it #casino alone, and then deleted #casino. Your wisp is in no
channel there: it hears no lines from that server and cannot post in it, until an admin picks
where it works again:
{"c":61,"n":131,"t":"grants","d":{"server":"5c3b1a2d-8e4f-4a6b-9c7d-0e1f2a3b4c55","hears":["shape","messages"],"does":["post","react","commands"],"channels":[]}}Taken out by an admin. Nothing more of the server reaches the line; treat any server.gone as
the end of that server for your wisp:
{"c":61,"n":140,"t":"server.gone","d":{"id":"5c3b1a2d-8e4f-4a6b-9c7d-0e1f2a3b4c55","why":"removed","name":"Saturday Squad"}}By grant
Section titled “By grant”| Grant | Events | For |
|---|---|---|
shape |
channel, channel.gone, layout, roles, emoji, emoji.gone, and server when the server itself changes (a new name, a new icon) |
keeping a map of the server |
members |
member, member.gone, member.roles |
welcomes, auto-roles, logs |
messages |
message, message.edit, message.gone, reaction |
levels, moderation, replies |
shape and members cover the whole server, whatever channels the grant names. messages
covers only the channels it names.
| Event | d |
|---|---|
channel |
id, server, name, type? (voice; left out: text), new? (just made) |
channel.gone |
id, server |
layout |
server, nodes?: the order of channels and sections, each type (channel, section), id, name?, children? (each type, id) |
roles |
server, roles: every role, highest first, each id, name, color?, permissions?, admin?, position?, default?, hoisted? |
emoji |
id, server, name, url, serverName |
emoji.gone |
id, server |
layout and roles are whole after any change, so replace yours with them.
members
Section titled “members”| Event | d |
|---|---|
member |
server, user, name?, avatar?, avatarColor?, banner?, bannerColor?, status?, flags?, joined, roleIds? |
member.roles |
server, user, roleIds? (the whole list; left out: none) |
member.gone |
server, user: they are out of the server, however they went |
status is the person’s own words, and flags marks on the account, as bits: 2 is a wisp.
dani joins:
{"c":61,"n":114,"t":"member","d":{"server":"5c3b1a2d-8e4f-4a6b-9c7d-0e1f2a3b4c55","user":"e1f7a3c5-9d4b-4a2e-b8c6-5f0e3d2a7144","name":"dani","avatar":"639198830442210985","avatarColor":"#06d6a0","bannerColor":"#14b8a6","joined":1791915000004271}}A member never carries presence or activity: Woosh takes both off before your wisp hears it.
messages
Section titled “messages”| Event | d |
|---|---|
message |
server, id, channel, parent? (the thread, for a thread reply), author, name?, avatar?, text?, at, edited?, reply?, files?, imported?, card?, run? |
message.edit |
server, id, channel, parent?, text?, files?, edited?, card?, run?: what it holds replaces the line’s |
message.gone |
server, id, channel, parent? |
reaction |
server, message, channel, parent?, emoji, user, name? (on an add), on? (left out: taken off) |
A line’s parts:
reply: the line it answers, as it was then:id,author?,name?,text?,files?(asfilesbelow).idalone: that line is gone.files: 1 to 10, eachid,url,name?,type?,mb?,w?,h?,expires?.card: a wisp’s card.run: the run a wisp’s line or edit answers:id,user,name?, andcommandfor a command’s answer (left out for a press’s).imported: on a line brought over from another app when its server was copied into Woosh, the name it had there. Such a line has noname, and itsauthoris not a person.
ana’s line, as your wisp hears it:
{ "c": 61, "n": 107, "t": "message", "d": { "server": "5c3b1a2d-8e4f-4a6b-9c7d-0e1f2a3b4c55", "id": "0199de8f-6c10-7a1b-8c3d-4e5f6a7b8c01", "channel": "6d4c2b3e-9f5a-4b7c-8d6e-1f2a3b4c5d66", "author": "3f1c9a52-6d1e-4c8b-9a51-2b7e0c4d8f11", "name": "ana", "avatar": "639201477315520417", "text": "Bora jogar às 21h? :wave:", "at": 1791914412304271 }}A wisp never hears its own new lines, edits or reactions back, its answers to runs among them:
it knows what it did. It does hear message.gone for its own lines, as for anyone’s, and every
other wisp’s lines.
Avatars
Section titled “Avatars”avatar is a short key, not an address. Build the address from it, media from your last
ready, and the id it sits beside (user, or author on a line):
| The key | The address |
|---|---|
holds :// |
the key itself |
| digits only | <media>/<user>?v=<key> |
| anything else | <media>/default-avatars/<key>.png |
No key: the person has no picture.
Under no grant does a wisp hear typing, presence, read marks, digests, anyone’s inbox, or lines
between people in DMs. Nor does it hear what goes to people’s apps alone: asides, card.live
frames, a tally’s card.counts, form.gone and commands.
Your wisp’s own presence is kept for it: it shows online while one of its lines is up. Its words are yours to set, and the apps show them under its name (Your wisp’s words).