sleep

Private

Content

63 lines
{=(prefix):-}
{=(tagname):sleep}

{=(offset):8}

{=(l1):{lower:{1}}}

{=(a.{l1}):7 10 night of sleep}
{=(a.sleep):{l1}}
{=(a.nap):1 4 nap}

{=(shiftStart):{a.{l1}(1)}}
{=(shiftEnd):{a.{l1}(2)}}
{=(howManyCycles):{replace(Z,):{replace(.0Z,):{m:{shiftEnd}-{shiftStart}}Z}}}

{=(hins):3600}

{=(unixtz):{m:trunc({unix}+({hins}*{replace(+,):{offset}}))}}

{=(COMMENT):each cycle in seconds (1h30 currently)}
{=(cycleins):5400}

{=(formattedCycle):{replace( ago,):{td:{strf({m:trunc({unix}+{cycleins})}):%F %T}}}}

{=(eqbase):{unixtz}+({shiftStart}*{hins})+({cycleins}*N)}

{=(eq):{m:trunc({replace(N,1):{eqbase}})} {m:trunc({replace(N,2):{eqbase}})} {m:trunc({replace(N,3):{eqbase}})} {m:trunc({replace(N,4):{eqbase}})} {m:trunc({replace(N,5):{eqbase}})} {m:trunc({replace(N,6):{eqbase}})}}

{=(tf):%-I:%M%p}

{=(currentTime):{replace(AM, AM):{replace(PM, PM):{strf({unixtz}):{tf}}}}}

{=(cyclesTimes):{strf({eq(1)}):{tf}} {strf({eq(2)}):{tf}} {strf({eq(3)}):{tf}} {strf({eq(4)}):{tf}} {strf({eq(5)}):{tf}} {strf({eq(6)}):{tf}} }

{=(fd):{strf({unixtz}):%F %T}}

{=(finalTimes):{cyclesTimes(+{howManyCycles})}}

{=(cyclesDelta):{strf({eq(1)}):{tf}} {td({eq(1)}):{fd}}~{strf({eq(2)}):{tf}} {td({eq(2)}):{fd}}~{strf({eq(3)}):{tf}} {td({eq(3)}):{fd}}~{strf({eq(4)}):{tf}} {td({eq(4)}):{fd}}~{strf({eq(5)}):{tf}} {td({eq(5)}):{fd}}~{strf({eq(6)}):{tf}} {td({eq(6)}):{fd}}}

{=(recommend):{cyclesDelta(+{howManyCycles}):~}}

{=(recommended):{replace( ago,):{replace(~,
):{recommend}}}}

{=(actName):{a.{l1}(3+)}}

{=(output):For you to wake up in between 2 sleep cycles (**every {formattedCycle}**) when having a **{actName}** and not struggle too much to get out of bed, you will need between **{shiftStart}** and **{shiftEnd} hours** of sleep, and you should set your alarm at the times below, given the current time (`{currentTime}`).

⏰ **Recommended Alarms**
{replace(M,M — in):{replace(AM, AM):{replace(PM, PM):{recommended}}}}
}

{=(previous):`{replace(AM, AM):{replace(PM, PM):{join(`
`):{finalTimes}}}}`}

{=(tag):{prefix}{tagname}}

{embed(color):#44408c}
{=(title):Comfortable Sleep Advisor}
{=(footer):{tag} [nap] • Made by cyanlol#5616}

{=(thumb):https://i.imgur.com/ero7uSo.gif}

Embed

1 line
{"color": 13434879, "title": "{title}", "footer": {"text": "{footer}", "icon_url": "https://images-ext-1.discordapp.net/external/rVHN-a8BzFrNs_WAPG6c97F6LU6EuYRj9U3MvnMdUfo/%3Fsize%3D1024/https/cdn.discordapp.com/avatars/777399648645677086/05172c77d1a25bffaf2da155d2d45a7f.png"}, "thumbnail": {"url": "{thumb}"}, "description": "{output}"}
Raw JSON
{
  "id": 988473,
  "created_at": "2021-08-04T10:53:59.000Z",
  "tag_name": "sleep",
  "nsfw": false,
  "owner_id": "777399648645677086",
  "uses": 25,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "",
  "hidden": false,
  "guild_id": "816950304255639562",
  "sharer": "777399648645677086",
  "content": "{=(prefix):-}\n{=(tagname):sleep}\n\n{=(offset):8}\n\n{=(l1):{lower:{1}}}\n\n{=(a.{l1}):7 10 night of sleep}\n{=(a.sleep):{l1}}\n{=(a.nap):1 4 nap}\n\n{=(shiftStart):{a.{l1}(1)}}\n{=(shiftEnd):{a.{l1}(2)}}\n{=(howManyCycles):{replace(Z,):{replace(.0Z,):{m:{shiftEnd}-{shiftStart}}Z}}}\n\n{=(hins):3600}\n\n{=(unixtz):{m:trunc({unix}+({hins}*{replace(+,):{offset}}))}}\n\n{=(COMMENT):each cycle in seconds (1h30 currently)}\n{=(cycleins):5400}\n\n{=(formattedCycle):{replace( ago,):{td:{strf({m:trunc({unix}+{cycleins})}):%F %T}}}}\n\n{=(eqbase):{unixtz}+({shiftStart}*{hins})+({cycleins}*N)}\n\n{=(eq):{m:trunc({replace(N,1):{eqbase}})} {m:trunc({replace(N,2):{eqbase}})} {m:trunc({replace(N,3):{eqbase}})} {m:trunc({replace(N,4):{eqbase}})} {m:trunc({replace(N,5):{eqbase}})} {m:trunc({replace(N,6):{eqbase}})}}\n\n{=(tf):%-I:%M%p}\n\n{=(currentTime):{replace(AM, AM):{replace(PM, PM):{strf({unixtz}):{tf}}}}}\n\n{=(cyclesTimes):{strf({eq(1)}):{tf}} {strf({eq(2)}):{tf}} {strf({eq(3)}):{tf}} {strf({eq(4)}):{tf}} {strf({eq(5)}):{tf}} {strf({eq(6)}):{tf}} }\n\n{=(fd):{strf({unixtz}):%F %T}}\n\n{=(finalTimes):{cyclesTimes(+{howManyCycles})}}\n\n{=(cyclesDelta):{strf({eq(1)}):{tf}} {td({eq(1)}):{fd}}~{strf({eq(2)}):{tf}} {td({eq(2)}):{fd}}~{strf({eq(3)}):{tf}} {td({eq(3)}):{fd}}~{strf({eq(4)}):{tf}} {td({eq(4)}):{fd}}~{strf({eq(5)}):{tf}} {td({eq(5)}):{fd}}~{strf({eq(6)}):{tf}} {td({eq(6)}):{fd}}}\n\n{=(recommend):{cyclesDelta(+{howManyCycles}):~}}\n\n{=(recommended):{replace( ago,):{replace(~,\n):{recommend}}}}\n\n{=(actName):{a.{l1}(3+)}}\n\n{=(output):For you to wake up in between 2 sleep cycles (**every {formattedCycle}**) when having a **{actName}** and not struggle too much to get out of bed, you will need between **{shiftStart}** and **{shiftEnd} hours** of sleep, and you should set your alarm at the times below, given the current time (`{currentTime}`).\n\n⏰ **Recommended Alarms**\n{replace(M,M — in):{replace(AM, AM):{replace(PM, PM):{recommended}}}}\n}\n\n{=(previous):`{replace(AM, AM):{replace(PM, PM):{join(`\n`):{finalTimes}}}}`}\n\n{=(tag):{prefix}{tagname}}\n\n{embed(color):#44408c}\n{=(title):Comfortable Sleep Advisor}\n{=(footer):{tag} [nap] • Made by cyanlol#5616}\n\n{=(thumb):https://i.imgur.com/ero7uSo.gif}",
  "embed": "{\"color\": 13434879, \"title\": \"{title}\", \"footer\": {\"text\": \"{footer}\", \"icon_url\": \"https://images-ext-1.discordapp.net/external/rVHN-a8BzFrNs_WAPG6c97F6LU6EuYRj9U3MvnMdUfo/%3Fsize%3D1024/https/cdn.discordapp.com/avatars/777399648645677086/05172c77d1a25bffaf2da155d2d45a7f.png\"}, \"thumbnail\": {\"url\": \"{thumb}\"}, \"description\": \"{output}\"}",
  "last_fetched": "2026-10-20T17:15:36.809Z"
}