From f20251d9bff57a87d4af75a5ad71050b76c01b91 Mon Sep 17 00:00:00 2001 From: n9k Date: Sun, 24 Jul 2022 10:19:20 +0000 Subject: [PATCH] Emotes: documentation --- doc/EMOTES.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/EMOTES.md diff --git a/doc/EMOTES.md b/doc/EMOTES.md new file mode 100644 index 0000000..bbe6cc5 --- /dev/null +++ b/doc/EMOTES.md @@ -0,0 +1,32 @@ +## Emotes + +Emotes are small images that are inserted into chat messages in place of +given strings. To add emotes, add entries to `emotes.json` that look +like below, then restart the server. + +```json +{ + "name": ":joy:", + "file": "joy.png", + "width": 20, + "height": 24 +} +``` +```json +{ + "name": "JoySpin", + "file": "emote/joyspin.gif", + "width": null, + "height": 24 +} +``` + +* `name` is the string that will be replaced in chat messages. + +* `file` is the location of the emote image relative to the static + directory `anonstream/static`. The file must actually be in the + static directory or a subdirectory of it. + +* `width` and `height` are the dimensions the inserted element + will have. Each can be either a non-negative integer or `null` + (automatic width/height).