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.
LocalStorage or something like in the $(eval)
5 replies
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.
/t/customapi-quote-system/1534582092787093695#m1534585530153701426
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.
Didn't find your answer? The community is on Discord.
Ask on Discord