Help on creating a condition based on date command

Asked Jun 15, 2024·2 replies·Last activity 2 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hey, I need help on creating a different response based on the day, something like if the person type !birthday it will say "it's not my birthday", except on april 20th, when it'll say "it's my birthday"
but i dont know javascript 😦

2 replies

first of all... fantastic b-day ^^
and yeah, i've made a few that'll give a count down to the next b-day until the day and then wish the streamer a happy b-day... so for what u want, it'd go something like this...

js
!addcom !birthday $(eval let d=[$(time YOUR_TIMEZONE "M,D")];d[0]==4&&d[1]==20?`it's my birthday`:`it's not my birthday`)

and just change YOUR_TIMEZONE to a proper timezone that can be found here

Stellar Raccoon said:
!addcom !birthday $(eval let d=[$(time YOUR_TIMEZONE "M,D")];d[0]==4&&d[1]==20?it's my birthday:it's not my birthday)

It worked perfectly, thanks