Unique Entries Per User

I was reading this thread and i was able to implement the command and have it work with the code form this comment on the thread. However,
i’m wondering if you are able to have it so when a user use the command to call their list, the list would show multiple entries.

im adapting this to pokemon. so my viewers can log their pokemon catches to a personalized list.
so with the pronoun example, i would need the command to allow multiple pronoun entries and when you do !pronouns it would reply with “User’s pronouns are: He, Him, Her, She” etc. because the same person would have logged “!addpronouns he” and “!addpronouns him” and “!addpronouns Her” and so on as they add more it would call a longer list.

i hope you can understand what im asking. im finding it hard to articulate it quite right.

Blockquote
!addpronouns:

$(eval `$(query)`.replace(/</g,``).replace(/>/g,``))

Blockquote
_addpronouns:

$(eval a=`$(urlfetch http://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=$(user)%20$(querystring))`; a.includes(`Successfully added entry`)?`$(user) added their pronouns to the list: $(query)`:`Error: ${a}`)

!!! Note: _addpronouns is the alias of !addpronouns, therefore make sure to fill the alias field of !addpronouns with _addpronouns.

Blockquote
!pronouns:

$(eval p=`$(urlfetch http://twitch.center/customapi/quote?token=PUBLIC_TOKEN&data=$(touser)&no_id=1)`.split(` `); u=p.shift(); u.toLowerCase()==`$(touser)`.toLowerCase()?`$(touser)'s pronouns are ${p.join(` `)}.`:`$(touser) has yet to add their pronouns to the list, they can do so by using !addpronouns <pronouns>`)

and when i have the code set up this way it will say it added another entry but when you do !pronoun it only calls the first additon that user ever made. i just want it to be able to add more to the list and when called display the whole list.

thank you for your time!

ok so, the easiest way to do this, the info will all be on one line… the only issue with that, is that there’s a 400 character limit (because of twitch’s 400 character per message limit) so u’d be really limited on how many poke a man names u’d be able to fit… my suggestion to provide room for more options is to save them in binary (0/1) to represent have/have not and the index number will correspond to a list in a pastebin that’ll hold all the names of the poke a mans

the code is a little bit different for that, so lemme know which way u’d like to go with it ^^

Thank you for taking the time to reply!

As i researched into it further i also saw that i would run into the problem of too many characters for the list. I like the idea of having the have/have not binary. I’m not very familiar with pastebin. Once i have the pastebin with the pokemon listed, whats next?
the paste bin: Pokémon Names up to 1010 - Pastebin.com
I do think your idea is the way to go to make this idea possible. I appreciate your help!
Thank you!

oh wow, that’s… alot more than i was expecting, lol… um, ok, so that’ll require 3 lines per person and 4 commands (3 commands for users to type and 1 for them to alias to) just to add them… honestly i would recommend making a new api for this… but i might be able to make it work with those extra commands, is still iffy whether or not enough code to do it will fit in the commands, lol… this gonna take me some time to work on, lol… and to do what i’m trying to do with it, the list paste needs to be in this format…

{"n":[`egg`,`bulbasaur`,`name3`,`name4`]}

all the names have to be between the square brackets [ ] surrounded by backticks ` (the button between esc and tab next to the 1) and separated by commas

Hey! Thanks for replying and checking it out.
I fully understand if it’s not really feasible or if it’s too much work. I don’t want you to have to spend a lot of time for this to work! I’m okay letting this one rest. I appreciate your help! I’ve found alternatives that will fill in for this want on my stream.

aww damn, alright then… i was looking forward to working that one out

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