How to translate uptime command

Asked Aug 27, 2020·2 replies·Last activity 5 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.

Hi, I come back now to help you to translate the "!uptime" command.

!addcom !uptime $(eval var a='$(twitch $(channel) "{{uptimeLength}}")';
if (a.includes("not live")){
"*here goes your personalized offline message*"
}else{
x=a.replace("hours","*h*");
y=x.replace("minutes","*m*");
z=y.replace("seconds","*s*");
"*Here is your personalized message to show the time:*"+z})
the text you can modify appears with this: *

For example in Spanish:

!addcom !uptime $(eval var a='$(twitch $(channel) "{{uptimeLength}}")';
if (a.includes("not live")){
"$(channel) no está en directo"}else{
x=a.replace("hours","horas");
y=x.replace("minutes","minutos");
z=y.replace("seconds","segundos");
"Tiempo que llevamos en directo: "+z})

2 replies

Tangy Jellyfish said:
x=a.replace(“ hours ”,“ h ”);
y=z.replace(“ minutes ”,“ m ”);
z=x.replace(“ seconds ”,“ s ”);

Small mistake but shouldn’t it be:

x=a.replace("hours","h");
y=x.replace("minutes","m");
z=y.replace("seconds","s");

?