1NIP-302======34Custom Emoji5------------67`draft` `optional`89Custom emoji may be added to **kind 0**, **kind 1**, **kind 1111** ([NIP-22](22.md)), **kind 7** ([NIP-25](25.md)) and **kind 30315** ([NIP-38](38.md)) events by including one or more `"emoji"` tags, in the form:1011```12["emoji", <shortcode>, <image-url>, <emoji-set-address>]13```1415Where:1617- `<shortcode>` is a name given for the emoji, which MUST be comprised of only alphanumeric characters, hyphens, and underscores.18- `<image-url>` is a URL to the corresponding image file of the emoji.19- `<emoji-set-address>` is an optional address pointer (`kind:pubkey:d-tag`) to the kind 30030 emoji set ([NIP-51](51.md)) the emoji belongs to.2021For each emoji tag, clients should parse emoji shortcodes (aka "emojify") like `:shortcode:` in the event to display custom emoji.2223Clients may allow users to add custom emoji to an event by including `:shortcode:` identifier in the event, and adding the relevant `"emoji"` tags.2425### Kind 0 events2627In kind 0 events, the `name` and `about` fields should be emojified.2829```json30{31 "kind": 0,32 "content": "{\"name\":\"Alex Gleason :soapbox:\"}",33 "tags": [34 ["emoji", "soapbox", "https://gleasonator.com/emoji/Gleasonator/soapbox.png"]35 ],36 "pubkey": "79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6",37 "created_at": 168279000038}39```4041### Kind 1 events4243In kind 1 events, the `content` should be emojified.4445```json46{47 "kind": 1,48 "content": "Hello :gleasonator: 😂 :ablobcatrainbow: :disputed: yolo",49 "tags": [50 ["emoji", "ablobcatrainbow", "https://gleasonator.com/emoji/blobcat/ablobcatrainbow.png", "30030:79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6:blobcats"],51 ["emoji", "disputed", "https://gleasonator.com/emoji/Fun/disputed.png"],52 ["emoji", "gleasonator", "https://gleasonator.com/emoji/Gleasonator/gleasonator.png"]53 ],54 "pubkey": "79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6",55 "created_at": 168263000056}57```5859### Kind 1111 events6061In kind 1111 events, the `content` should be emojified.6263```json64{65 "kind": 1111,66 "content": "Let's party! :hyves_banaan:",67 "tags": [68 ["emoji", "hyves_banaan", "https://relay.nyves.nl/8408b236b11fe5c764d139d37e670d5207b3825fe6396392799b02c4e6bd2ebf.gif", "30030:9919981db5d9f59713bd717069212c32a19b55f2280a51e70c49c5b73da306b9:Hyves"]69 ],70 "pubkey": "79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6",71 "created_at": 168263000072}73```7475### Kind 7 events7677In kind 7 events, the `content` should be emojified.7879```json80{81 "kind": 7,82 "content": ":dezh:",83 "tags": [84 ["emoji", "dezh", "https://raw.githubusercontent.com/dezh-tech/brand-assets/main/dezh/logo/black-normal.svg"]85 ],86 "pubkey": "79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6",87 "created_at": 168263000088}89```