toluschr / BetterDiscord-Animated-Status

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

further customizing the clock function! #109

Open tatsugiri opened 2 years ago

tatsugiri commented 2 years ago

Notice taken

Plugin Version

0.13.2

What do you need help with?

i feel rather silly in writing this but i've got about as much coding ability as a shrimp would! i wanted to see about a couple of things, and i wasn't sure where to go to except for here. ^^;; (i'm also very new to github, so i apologize if i'm missing something here!)

  1. is there a possibility of adding AM/PM to the 12 hour clock's coding?

  2. can i condense two cells into one status?

what i mean by the second question is, rather than flipping between two cells to state "my time currently is" "[current time]", i wanted to see if i could condense it into a single cell/status. i'm just not sure how to do this without it interfering with the code, i've tried a couple different things but again my knowledge is extremely limited.

if one would be so kind as to lend a hand i'd appreciate it! i understand that this isn't an issue with the plugin itself however, it's working great as is, but if further customization is possible then i'd like to learn!

i'll also provide an image example to kind of further explain what exactly i'm trying to achieve here.

image

if this is possible to achieve i'd greatly appreciate the help!! i frequent a lot of servers and i feel having my specific time displayed would be useful not just for me, but for those i interact with.

thank you very much to whoever takes the time to read this. <3

Technetium1 commented 2 years ago

Be aware you can be banned for using this plugin as it can abuse the rate limit for status changes, tread lightly.

tatsugiri commented 2 years ago

Be aware you can be banned for using this plugin as it can abuse the rate limit for status changes, tread lightly.

i appreciate the concern! ^^ i've got the step duration set to about 3.5 seconds so i'm hoping that's enough to pass under the radar. i don't need it to be changing ultra frequently anyways since i don't have the clock counting seconds.

tatsugiri commented 2 years ago

so i have managed to figure out how to implement AM/PM to the 12 hour clock thanks to someone over discord! here it is as it currently stands:

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

did not realize however the character limit for statuses still applied (silly of me ofc) but afaik it seems i wouldn't be able to condense this further than what it's at rn. still achieved something here at least! i'll keep this open incase somebody happens to come by with input ^_^

alexonpeace commented 1 year ago

Thank you, this works really good