Hey @TamiJo!
If you want to get users specify their own pronouns, allow me to redirect you to the quote system API. You’ll get your TOKENS
by clicking on the second link in the post, in the Manual Installation section, use these in the commands I wrote. To know where to look for your PUBLIC_TOKEN
and PRIVATE_TOKEN
, look at the field bellow:
$(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&data=$(querystring))
$(urlfetch https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=$(querystring))
$(urlfetch https://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&data=$(querystring))
Keep your PRIVATE_TOKEN
secret, don’t share it anywhere. Add the following commands from the dashboard. Don’t use the chat as anyone could monitor it and copy the token, they could then edit your data.
Edit: improved the commands a bit.
We won’t use $(querystring)
alone however, as we’ll use the API to store something else than quotes, so you’ll have…
• !addpronouns
:
$(eval `$(query)`.replace(/</g,``).replace(/>/g,``))
• _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
.
• !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>`)
Example of usage:
Emily: !pronouns BobTheBuilder
Nightbot: BobTheBuilder’s pronouns are he/him.
Emily: !pronouns TamiJo
Nightbot: TamiJo has yet to add their pronouns to the list, they can do so by using !addpronouns <pronouns>
Emily: !pronouns
Nightbot: Emily has yet to add their pronouns to the list, they can do so by using !addpronouns <pronouns>
Emily: !addpronouns she/her
Nightbot: Emily added their pronouns to the list: she/her
Emily: !pronouns
Nightbot: Emily’s pronouns are she/her.