LocalStorage or something like in the $(eval)

I was thinking about to make a custom command using some way to keep a data (like a var or an array) to use the next time someone ask the command. Someone could help me? I tried use LocalStorage but i guess it doesn’t work.

What data do you want to store firstly. And secondly yes it is most likely possible.

An Array. If i could pass it between two or more commands would be good too. Like an command to generate that data and another to show it

and, do you know a way to extend the max. letters at the message box?

Ok so you can only put up to 500 characters in the message field when adding commands but a way to get messages with more than 500 characters can be got with the use of urlfetch.

Also, I’ll link you to a Custom quote API that you can achieve your goal with if you need any help setting it up just say so and I can help you out. Or if you need me to elaborate more.


All this thing is a little upper than my programming level, and i’m getting a lot of difficulty to understand how do i can do to my code work. may you see my idea? LocalStorage doesn’t work but idk how do i use the urlfetch here. (dk how it works in fact)

$(eval if($(count)!=1){v=0;a=localStorage.getItem(“a”).split(",");for(i=0;i<a.length;i++){if($(1)==a[i]){$(user)+“avisou “+a[i]+”. Já é o “+ac[i]+“° aviso.”;ac[i]++;v=1;}}if(v==0){$(1)+” foi avisado por “+$(user)+”, fica esperto!”;a.push($(1));ac.push(1);}localStorage.setItem(“a”, a);localStorage.setItem(“ac”, ac.toString());}else{a=[];ac=[];localStorage.setItem(“a”, a);localStorage.setItem(“ac”, ac.toString());“Código configurado”})

I’m sorry if it’s a lot of thing that i’m asking for.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.