toluschr / BetterDiscord-Animated-Status

Animate your Discord Status with this BetterDiscord Plugin
MIT License
254 stars 488 forks source link

Concatenate string with clock symbol in text field #103

Closed howdoiusekeyboard closed 2 years ago

howdoiusekeyboard commented 2 years ago

Notice taken

Plugin Version

0.13.2

What do you need help with?

Your code: eval ['πŸ•›','πŸ•','πŸ•‘','πŸ•’','πŸ•“','πŸ•”','πŸ••','πŸ•–','πŸ•—','πŸ•˜','πŸ•™','πŸ•š'][((new Date()).getHours()%12)]; I advanced it to be more precise to the actual time (added half past clock emojis too), so now the symbol changes every 30 mins instead of 1 hr eval ['πŸ•›','πŸ•§','πŸ•','πŸ•œ','πŸ•‘','πŸ•','πŸ•’','πŸ•ž','πŸ•“','πŸ•Ÿ','πŸ•”','πŸ• ','πŸ••','πŸ•‘','πŸ•–','πŸ•’','πŸ•—','πŸ•£','πŸ•˜','πŸ•€','πŸ•™','πŸ•₯','πŸ•š','πŸ•¦'][2*(new Date().getHours()%12)+Math.floor(new Date().getMinutes()/30)]; This is the code for the same (It has twice the number of ranging symbols 24 instead of 12) I can use the same code in the text field and it successfully retrieves the appropriate symbol

My question is: How do I input some text before the symbol as well Eg: "text": "Never gonna let you down <eval ['πŸ•›','πŸ•§','πŸ•','πŸ•œ','πŸ•‘','πŸ•','πŸ•’','πŸ•ž','πŸ•“','πŸ•Ÿ','πŸ•”','πŸ• ','πŸ••','πŸ•‘','πŸ•–','πŸ•’','πŸ•—','πŸ•£','πŸ•˜','πŸ•€','πŸ•™','πŸ•₯','πŸ•š','πŸ•¦'][2*(new Date().getHours()%12)+Math.floor(new Date().getMinutes()/30)];>"

howdoiusekeyboard commented 2 years ago

Ok I resolved this eval let arr='Hi'+['πŸ•›','πŸ•§','πŸ•','πŸ•œ','πŸ•‘','πŸ•','πŸ•’','πŸ•ž','πŸ•“','πŸ•Ÿ','πŸ•”','πŸ• ','πŸ••','πŸ•‘','πŸ•–','πŸ•’','πŸ•—','πŸ•£','πŸ•˜','πŸ•€','πŸ•™','πŸ•₯','πŸ•š','πŸ•¦'][2*(new Date().getHours()%12)+Math.floor(new Date().getMinutes()/30)];arr