sleep
Privateunrated
Content
73 lines{=(COMMENT):--- General settings. There should be only 3 things for you to edit in the code. The prefix, the tag name and the EST offset. ---}
{=(COMMENT):Your preferred server prefix and this tag's name.}
{=(prefix):-}
{=(tagname):sleep}
{=(COMMENT):Amount of hours in your timezone from the UTC/GTM timezone.
This ensures the time displayed is in your local time.
Take into account winter/summer time. Don't hesitate to use Google to know your offset from UTC.
Set it to 0 if you don't mind it being in UTC.}
{=(offset):-4}
{=(COMMENT):--- There is nothing to edit anymore! ---}
{=(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+)}}
{=(credits):Animated Thumbnail made using storyset.com}
{=(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] • {credits}}
{=(thumb):https://i.imgur.com/ero7uSo.gif}Embed
1 line{"color": 5198940, "title": "{title}", "footer": {"text": "{footer}"}, "thumbnail": {"url": "{thumb}"}, "description": "{output}"}Raw JSON
{
"id": 985701,
"created_at": "2021-08-03T04:15:46.000Z",
"tag_name": "sleep",
"nsfw": false,
"owner_id": "559927848069103647",
"uses": 12,
"description": null,
"restricted": false,
"shared": false,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "847612617870409758",
"sharer": "559927848069103647",
"content": "{=(COMMENT):--- General settings. There should be only 3 things for you to edit in the code. The prefix, the tag name and the EST offset. ---}\n{=(COMMENT):Your preferred server prefix and this tag's name.}\n{=(prefix):-}\n{=(tagname):sleep}\n\n{=(COMMENT):Amount of hours in your timezone from the UTC/GTM timezone.\nThis ensures the time displayed is in your local time.\nTake into account winter/summer time. Don't hesitate to use Google to know your offset from UTC.\nSet it to 0 if you don't mind it being in UTC.}\n{=(offset):-4}\n\n\n{=(COMMENT):--- There is nothing to edit anymore! ---}\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{=(credits):Animated Thumbnail made using storyset.com}\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] • {credits}}\n\n{=(thumb):https://i.imgur.com/ero7uSo.gif}",
"embed": "{\"color\": 5198940, \"title\": \"{title}\", \"footer\": {\"text\": \"{footer}\"}, \"thumbnail\": {\"url\": \"{thumb}\"}, \"description\": \"{output}\"}",
"last_fetched": "2026-10-20T17:14:42.850Z"
}