toluschr / BetterDiscord-Animated-Status

Animate your Discord Status with this BetterDiscord Plugin
MIT License
255 stars 489 forks source link

How can I make a text before custom script? #37

Closed MajliTech closed 3 years ago

MajliTech commented 3 years ago

Hi, I want to make my status something like this: The time is: 00:00:00 but I don't know how to put text before it. I've copied it

eval let fmt=t=>(t<10?'0':'')+t;let d=new Date();`${fmt(d.getHours())}:${fmt(d.getMinutes())}:${fmt(d.getSeconds())}`;

but how to put text before time?

toluschr commented 3 years ago
​eval​ ​let​ ​fmt​=​t​=>​(​t​<​10​?​'0'​:​''​)​+​t​;​let​ ​d​=​new​ ​Date​(​)​;​`​time is: ${​fmt​(​d​.​getHours​(​)​)​}​:​${​fmt​(​d​.​getMinutes​(​)​)​}​:​${​fmt​(​d​.​getSeconds​(​)​)​}​`​;