toluschr / BetterDiscord-Animated-Status

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

SyntaxError: Unexpected token '{' #69

Open Shawkeee opened 3 years ago

Shawkeee commented 3 years ago

Hello I am using the newest Discord version and installed the newest version of the plugin. When opening the settings page and setting the custom animated clock status like you explain, by clicking the save button does not apply the status. There is a error message SyntaxError: Unexpected token '{'. This happens if i try this: Emoji-Field eval ['🕛','🕐','🕑','🕒','🕓','🕔','🕕','🕖','🕗','🕘','🕙','🕚'][((new Date()).getHours()%12)]; Text-Field eval let fmt=t=>(t<10?'0':'')+t;let d=new Date();${fmt(d.getHours())}:${fmt(d.getMinutes())}:${fmt(d.getSeconds())};

When i try the: ONLY THE EMOJI-FIELD eval ['🕛','🕐','🕑','🕒','🕓','🕔','🕕','🕖','🕗','🕘','🕙','🕚'][((new Date()).getHours()%12)];

i get no errors but the clock isn't animated like your preview.

help helpp

Bobrecay commented 2 years ago

STATUS CLOCK CODES: 24-hr clock without symbols "eval let fmt=t=>(t<10?'0':'')+t;let d=new Date();${fmt(d.getHours())}:${fmt(d.getMinutes())};"

24-hr clock with symbols 🕐 "eval let fmt=t=>(t<10?'0':'')+t;let d=new Date();${fmt(d.getHours())}:${fmt(d.getMinutes())};","eval ['🕛','🕐','🕑','🕒','🕓','🕔','🕕','🕖','🕗','🕘','🕙','🕚'][((new Date()).getHours()%12)];"

12-hr clock without symbols "eval let fmt=t=>(t<10?'0':'')+t;let d=new Date();${fmt(d.getHours()% 12 || 12)}:${fmt(d.getMinutes())};"

12-hr clock with symbols 🕐 "eval let fmt=t=>(t<10?'0':'')+t;let d=new Date();${fmt(d.getHours()% 12 || 12)}:${fmt(d.getMinutes())};","eval ['🕛','🕐','🕑','🕒','🕓','🕔','🕕','🕖','🕗','🕘','🕙','🕚'][((new Date()).getHours()%12)]" Credits to : https://www.youtube.com/watch?v=LThjqDTtjGU&ab_channel=NoTextToSpeech