temp
Privateunrated
Content
69 lines{=(COMMENT):─── COMMAND CONFIGURATION ───}
{=(COMMENT):Daily reset time (24-hour clock). Format `HH:MM` MUST be respected.}
{=(time.reset):07:00}
{=(COMMENT):Timezone Management. Set "timezone.offset" to 0 if it should return UTC date.
This corresponds to the amount of hours there is between your personal timezone and UTC.}
{=(timezone.offset):0}
{=(COMMENT):───────────────────────────────────
There should be nothing to touch below. Only do it if you know what you're doing.}
{=(COMMENT):Returns the datetime values **in your own timezone** of today and of the reset, in case you want to display them somewhere.}
{=(hour.in.second):3600}
{=(timezone.today.unix):{m:trunc(({timezone.offset}*{hour.in.second})+{unix})}}
{=(timezone.today.datetime):{strf({timezone.today.unix}):%F %T}}
{=(COMMENT):Today's date and time.}
{=(today.date):{strf({timezone.today.unix}):%F}}
{=(today.time):{strf({timezone.today.unix}):%T}}
{=(today.datetime):{today.date} {today.time}}
{=(today.unix):{timezone.today.unix}}
{=(COMMENT):Tomorrow's date and time.}
{=(seconds.in.day):86400}
{=(one.more.day):{strf({m:trunc({seconds.in.day}+{today.unix})}):%F}}
{=(tomorrow.date):{one.more.day}}
{=(tomorrow.datetime):{tomorrow.date} {today.time}}
{=(COMMENT):Checking the sign (positive or negative) of the difference between today's date and the reset date.}
{=(unix.reset):{strf({today.date} {time.reset}:00):%s}}
{=(unix.diff):{m:trunc({today.unix}-{unix.reset})}}
{=(diff.sgn):{m:sgn({unix.diff})}}
{=(COMMENT):If it is positive, it means the reset has already happened today and it should take tomorrow's datetime; otherwise today's datetime.}
{=(reset.to.take):{if({diff.sgn}==1):{tomorrow.date}|{today.date}} {time.reset}:00}
{=(reset.datetime):{reset.to.take}}
{=(reset.unix):{strf({reset.datetime}):%s}}
{=(COMMENT):Actual time remaining between now and the next daily reset!}
{=(time.remains):{m:trunc({reset.unix}-{today.unix})}}
{=(COMMENT):Debug variable, in which I call almost all the variables in that code to know which value they return and troubleshoot the command. I very much recommend you do this when debugging your code.}
{=(debug):__Debug:__
today.datetime `{today.datetime}`
today.unix `{unix}`
tomorrow.date `{tomorrow.date}`
tomorrow.datetime `{tomorrow.datetime}`
unix.reset `{unix.reset}`
unix.diff `{unix.diff}`
diff.sgn `{diff.sgn}`
reset.to.take `{reset.to.take}`
reset.datetime `{reset.datetime}`
reset.unix `{reset.unix}`
Timezone Management:
timezone.today.unix `{timezone.today.unix}`
timezone.today.datetime `{timezone.today.datetime}`
time.remains `{time.remains}`
}
{=(COMMENT):Role to be assigned with the temprole command.}
{=(role):852108366776107010}
{require(LOL NOPE):admin}
{=(COMMENT):Output command.}
{cmd:temprole {args} {role} {time.remains}s}Raw JSON
{
"id": 877975,
"created_at": "2021-06-09T08:51:34.000Z",
"tag_name": "temp",
"nsfw": false,
"owner_id": "391242096201302039",
"uses": 40,
"description": null,
"restricted": false,
"shared": false,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "828240615946453012",
"sharer": "391242096201302039",
"content": "{=(COMMENT):─── COMMAND CONFIGURATION ───}\n{=(COMMENT):Daily reset time (24-hour clock). Format `HH:MM` MUST be respected.}\n{=(time.reset):07:00}\n{=(COMMENT):Timezone Management. Set \"timezone.offset\" to 0 if it should return UTC date.\nThis corresponds to the amount of hours there is between your personal timezone and UTC.}\n{=(timezone.offset):0}\n\n{=(COMMENT):───────────────────────────────────\nThere should be nothing to touch below. Only do it if you know what you're doing.}\n\n{=(COMMENT):Returns the datetime values **in your own timezone** of today and of the reset, in case you want to display them somewhere.}\n{=(hour.in.second):3600}\n{=(timezone.today.unix):{m:trunc(({timezone.offset}*{hour.in.second})+{unix})}}\n{=(timezone.today.datetime):{strf({timezone.today.unix}):%F %T}}\n\n{=(COMMENT):Today's date and time.}\n{=(today.date):{strf({timezone.today.unix}):%F}}\n{=(today.time):{strf({timezone.today.unix}):%T}}\n{=(today.datetime):{today.date} {today.time}}\n{=(today.unix):{timezone.today.unix}}\n\n{=(COMMENT):Tomorrow's date and time.}\n{=(seconds.in.day):86400}\n{=(one.more.day):{strf({m:trunc({seconds.in.day}+{today.unix})}):%F}}\n{=(tomorrow.date):{one.more.day}}\n{=(tomorrow.datetime):{tomorrow.date} {today.time}}\n\n{=(COMMENT):Checking the sign (positive or negative) of the difference between today's date and the reset date.}\n{=(unix.reset):{strf({today.date} {time.reset}:00):%s}}\n{=(unix.diff):{m:trunc({today.unix}-{unix.reset})}}\n{=(diff.sgn):{m:sgn({unix.diff})}}\n\n{=(COMMENT):If it is positive, it means the reset has already happened today and it should take tomorrow's datetime; otherwise today's datetime.}\n{=(reset.to.take):{if({diff.sgn}==1):{tomorrow.date}|{today.date}} {time.reset}:00}\n{=(reset.datetime):{reset.to.take}}\n{=(reset.unix):{strf({reset.datetime}):%s}}\n\n\n{=(COMMENT):Actual time remaining between now and the next daily reset!}\n{=(time.remains):{m:trunc({reset.unix}-{today.unix})}}\n\n{=(COMMENT):Debug variable, in which I call almost all the variables in that code to know which value they return and troubleshoot the command. I very much recommend you do this when debugging your code.}\n{=(debug):__Debug:__\ntoday.datetime `{today.datetime}`\ntoday.unix `{unix}`\ntomorrow.date `{tomorrow.date}`\ntomorrow.datetime `{tomorrow.datetime}`\n\nunix.reset `{unix.reset}`\nunix.diff `{unix.diff}`\ndiff.sgn `{diff.sgn}`\n\nreset.to.take `{reset.to.take}`\nreset.datetime `{reset.datetime}`\nreset.unix `{reset.unix}`\n\nTimezone Management:\ntimezone.today.unix `{timezone.today.unix}`\ntimezone.today.datetime `{timezone.today.datetime}`\n\ntime.remains `{time.remains}`\n}\n\n{=(COMMENT):Role to be assigned with the temprole command.}\n{=(role):852108366776107010}\n{require(LOL NOPE):admin}\n\n{=(COMMENT):Output command.}\n{cmd:temprole {args} {role} {time.remains}s}",
"embed": "{}",
"last_fetched": "2026-10-20T16:44:29.791Z"
}