Module appearance
Expand description
The name and avatar a bot shows for one action, as a webhook does: a bridge posts a Discord user’s message under that user’s name. The bot stays the author; an appearance is presentation recorded in provenance, never identity. A value that fails validation refuses the invocation; it is never cleaned up, so what a reader sees is exactly what the bot sent.
Structs§
- Appearance
- What a bot showed for one action instead of its own name and icon.
- Persona
- An account on another service, such as
discord/80351110224678912.
Enums§
- Appearance
Error - Why an appearance was refused.
Constants§
- MAX_
AVATAR_ BYTES - The largest avatar image.
- MAX_
NAME_ CHARS - The longest name, in characters, after trimming.
Functions§
- admit
- Admit
appearanceon a request fromcaller, for the room-action door: only a bot whose installationallows_personasmay show another name, the appearance must be valid, and its avatar must be an imageavatarfinds in the room’s content store under its own hash. - check_
avatar_ bytes - Check the bytes an avatar hash names: small, and a raster image. SVG is refused because it is a document, not a picture.
- refuse_
here - For a door that cannot check that its caller is a bot allowed to show other names: refuse a request carrying an appearance instead of running it under the caller’s own name.