>

Privateunrated

Content

38 lines
{=(footertext):Quoted by: {user(proper)}}
{delete}{embed(timestamp):now}{=():}
{{if({args(1)}==):require(You need to quote something or someone.):carl-bot}}
{=(comment):this attempts to sanitize any linebreaks, quote block GT signs (>) or vertical pipes (|) for the code duration, is undone at the end}
{=(nargs):{replace(|,╬):{replace(
, ╦ ):{replace(
> , ╦ ):{args}}}}}

{=(comment):a leftover from my embedthis tag that does no harm here, just removes an extra space at the beginning if present that would ruin the image grab}
{=(nargs):{if({nargs(1)}==):{nargs(2+)}|{nargs}}}

{=(comment):this adds a space before a user mention, as discord's quote system does not naturally add a space between the mention and the last word in the quote}
{=(nargs):{replace(<@, <@):{nargs}}}

{=(comment):This attempts to replace any superfluous spaces that were in the body of the original message so the image url can be grabbed accurately, as index ignores the spaces but variable parsing does not.}
{=(nargs):{replace(─, ):{join(─):{nargs}}}}

{=(comment):This section finds the image, attempt to make sure it will not cause a json error, then creates a jump link in the description body in place where the image was. only does so for the first image present, and only the first image will be put in the embed display}
{=(imgtest):{replace(., ):{replace(-1.,):{index(.gif):{replace(.gif,. .gif .):{nargs}}}.{index(.png):{replace(.png,. .png .):{nargs}}}.{index(.jpg):{replace(.jpg,. .jpg .):{nargs}}}.{index(.jpeg):{replace(.jpeg,. .jpeg .):{nargs}}}.}}}
{=(imgindex):{if({imgtest1}!=):{imgtest(1)}}}
{=(preimg):{nargs({imgindex})}}
{=(imgnoturl):{contains(false):{in(http):{preimg(1)::}} {in(//):{preimg(2)::}}}}
{=(image):{if({imgnoturl}==false):{preimg}}}
{=(nargs):{if({imgnoturl}==false):{if({imgindex}!=1):{nargs(+{m:trunc({imgindex}-1)})} }([image link]({nargs({imgindex})})) {nargs({m:trunc({imgindex}+1)}+)}|{nargs}}}

{=(comment):This section looks to see if there was a target mention at the end or the beginning of the args, and if found, sets the appropriate args parsing such to remove it from the description body}
{=(trgtchk):{if({in({target(id)}):{nargs(0)}}==true):(+-1)|{if({in({target(id)}):{nargs(1)}}==true):(3+)}}}

{=(comment):this sets the entity to target if the target id was found in the first or last arg. otherwise, it sets it to user assuming the target mention in the message body is part of the message}
{=(entity):{if({trgtchk}!=):target|user}}

{=(comment):sets the description to the appropriate parsing of the quote body and "un"sanitizes it}
{=(predes):{if({trgtchk}!=):{nargs{trgtchk}}|{nargs}}}
{=(des):{replace(╦,
):{replace(╬,|):{predes}}}}

{=(comment):sets the embed color to the entity color}
{embed(color):{{entity}(color)}}

Embed

1 line
{"color": 5198940, "image": {"url": "{image}"}, "author": {"name": "{{entity}(proper)}", "icon_url": "{{entity}(avatar)}"}, "footer": {"text": "{footertext}"}, "description": "{des}"}
Raw JSON
{
  "id": 195373,
  "created_at": "2022-04-26T10:36:16.914Z",
  "tag_name": ">",
  "nsfw": false,
  "owner_id": "338520318505254913",
  "uses": 9,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "526919876540104735",
  "sharer": "338520318505254913",
  "content": "{=(footertext):Quoted by: {user(proper)}}\n{delete}{embed(timestamp):now}{=():}\n{{if({args(1)}==):require(You need to quote something or someone.):carl-bot}}\n{=(comment):this attempts to sanitize any linebreaks, quote block GT signs (>) or vertical pipes (|) for the code duration, is undone at the end}\n{=(nargs):{replace(|,╬):{replace(\n, ╦ ):{replace(\n> , ╦ ):{args}}}}}\n\n{=(comment):a leftover from my embedthis tag that does no harm here, just removes an extra space at the beginning if present that would ruin the image grab}\n{=(nargs):{if({nargs(1)}==):{nargs(2+)}|{nargs}}}\n\n{=(comment):this adds a space before a user mention, as discord's quote system does not naturally add a space between the mention and the last word in the quote}\n{=(nargs):{replace(<@, <@):{nargs}}}\n\n{=(comment):This attempts to replace any superfluous spaces that were in the body of the original message so the image url can be grabbed accurately, as index ignores the spaces but variable parsing does not.}\n{=(nargs):{replace(─, ):{join(─):{nargs}}}}\n\n{=(comment):This section finds the image, attempt to make sure it will not cause a json error, then creates a jump link in the description body in place where the image was. only does so for the first image present, and only the first image will be put in the embed display}\n{=(imgtest):{replace(., ):{replace(-1.,):{index(.gif):{replace(.gif,. .gif .):{nargs}}}.{index(.png):{replace(.png,. .png .):{nargs}}}.{index(.jpg):{replace(.jpg,. .jpg .):{nargs}}}.{index(.jpeg):{replace(.jpeg,. .jpeg .):{nargs}}}.}}}\n{=(imgindex):{if({imgtest1}!=):{imgtest(1)}}}\n{=(preimg):{nargs({imgindex})}}\n{=(imgnoturl):{contains(false):{in(http):{preimg(1)::}} {in(//):{preimg(2)::}}}}\n{=(image):{if({imgnoturl}==false):{preimg}}}\n{=(nargs):{if({imgnoturl}==false):{if({imgindex}!=1):{nargs(+{m:trunc({imgindex}-1)})} }([image link]({nargs({imgindex})})) {nargs({m:trunc({imgindex}+1)}+)}|{nargs}}}\n\n{=(comment):This section looks to see if there was a target mention at the end or the beginning of the args, and if found, sets the appropriate args parsing such to remove it from the description body}\n{=(trgtchk):{if({in({target(id)}):{nargs(0)}}==true):(+-1)|{if({in({target(id)}):{nargs(1)}}==true):(3+)}}}\n\n{=(comment):this sets the entity to target if the target id was found in the first or last arg. otherwise, it sets it to user assuming the target mention in the message body is part of the message}\n{=(entity):{if({trgtchk}!=):target|user}}\n\n{=(comment):sets the description to the appropriate parsing of the quote body and \"un\"sanitizes it}\n{=(predes):{if({trgtchk}!=):{nargs{trgtchk}}|{nargs}}}\n{=(des):{replace(╦,\n):{replace(╬,|):{predes}}}}\n\n{=(comment):sets the embed color to the entity color}\n{embed(color):{{entity}(color)}}",
  "embed": "{\"color\": 5198940, \"image\": {\"url\": \"{image}\"}, \"author\": {\"name\": \"{{entity}(proper)}\", \"icon_url\": \"{{entity}(avatar)}\"}, \"footer\": {\"text\": \"{footertext}\"}, \"description\": \"{des}\"}",
  "last_fetched": "2026-10-20T21:33:39.443Z"
}