Skip to content

Comments

emote tag #24

Draft
Perska wants to merge 3 commits into12Me21:cactusfrom
Perska:emote
Draft

emote tag #24
Perska wants to merge 3 commits into12Me21:cactusfrom
Perska:emote

Conversation

@Perska
Copy link

@Perska Perska commented Feb 22, 2026

implements emotes in a minimum way
\e[source;role;name;id]
(note: this reads in a reverse order; the other forms are \e[id], \e[name;id], and \e[role;name;id])

  • source: where to source the emote from. if empty, uses sbs:image/id syntax. other included sources: URL, and discord
  • role: specifies the size to display the emote at
  • name: used for the alt text. (if id is also missing for some reason, it defaults to the name.)
  • id: the emote that should be loaded. source specific in how it's handled.
    it's also possible to include filters after this, by separating them from the id with a #
    • h, v: flips image horizontally and vertically, respectively
    • r: rotates image 90 degrees
    • p: sets the image to render with image-rendering set to pixelated/crisp-edges. also requests original resolution images for default source. (i would've done something like with pixel avatars and made them display pixel perfectly but i didn't feel like doing so right now. maybe it should also be a separate flag anyway)

there's multi-source support so that it may be extended by a frontend. (theoretical example? allow users to create a personal mapping for emotes? like source "user-5" could try searching for a page by user 5 that's marked in a way. idk. it could also just point to a hardcoded list.)

example syntax:

So... \e[icon;star bit;imagehash1]\bg[purple]{chunks}, huh?
---
yeah \e[sticker;flareon;imagehash2#hp]\e[url;medium;thumbs up paw;https://example.com/image.png]
---
\e[imagehash3]\e[imagehash3#h]\e[imagehash3#v]\e[imagehash3#r]\e[imagehash3#hv]\e[imagehash3#hr]\e[imagehash3#vr]\e[rimagehash3#hvr] look at my marios
---
\e[discordsticker;sticker;headphones kirby vibing;901150326533550120]\e[discordsticker;sticker;headphones kirby vibing;901150326533550120]\e[discordsticker;sticker;headphones kirby vibing;901150326533550120] listening to static noise

renders as such:
post that demonstrates emotes in varying sizes, displayed inline alongside the text, some also being rotated and flipped

subject to change?:

  • role names
  • what resolution images get requested at by default for sbs:image (on my computer, 'sticker' size emotes display at 144px, whereas the size query param always uses 128px no matter the role)
  • the whole "args get read in reverse" thing
  • vertical-align? it's currently set to middle, but i did see that a previous comment suggested a value for this. however, it's only for icon sized emotes, and there doesn't seem to way offset the images from the middle position in a convenient manner. (setting margins with negative values causes images to overlap with elements on other lines.)

maybe not subject to change:

  • syntax, overall. might be more of a frontend's job to handle entering emotes and conversion between internal syntax and user entered text? shrug

other notes:

  • discord default stickers don't work cause they're canvas rendered vector things but that probably doesn't like matter
  • baseline emote size can be overridden with a CSS variable. maybe useful to have as a frontend option

discord split into discordemote and discordsticker
default source is now part of the EMOTE_SOURCES object
addfallback source that always returns null
@Perska Perska marked this pull request as draft February 23, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant