2randos
Proof of concept: 2 random entries from a list with no duplicates by removal of first random entry from the list via the replace block. List shown with ~ separators should entries include a comma. List has an extra separator on the end so the replace cannot be flawed. The tag prints out each variable every step for educational purposes.
Privateunrated
Content
6 lines{=(rlist):one~two~three~four~five~six~seven~eight~nine~ten~}{rlist}
{=(1stran):{range:1-10}}{1stran}
{=(1stentry):{rlist({1stran}):~}}{1stentry}
{=(rlist):{replace({1stentry}~,):{rlist}}}{rlist}
{=(2ndran):{range:1-9}}{2ndran}
{=(2ndentry):{rlist({2ndran}):~}}{2ndentry}{require:Admin}Raw JSON
{
"id": 52119,
"created_at": "2019-06-08T20:42:52.000Z",
"tag_name": "2randos",
"nsfw": false,
"owner_id": "129419437911572480",
"uses": 10,
"description": "Proof of concept:\n2 random entries from a list with no duplicates by removal of first random entry from the list via the replace block. \nList shown with ~ separators should entries include a comma. List has an extra separator on the end so the replace cannot be flawed.\nThe tag prints out each variable every step for educational purposes.",
"restricted": false,
"shared": false,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "542013028795809792",
"sharer": "129419437911572480",
"content": "{=(rlist):one~two~three~four~five~six~seven~eight~nine~ten~}{rlist}\n{=(1stran):{range:1-10}}{1stran}\n{=(1stentry):{rlist({1stran}):~}}{1stentry}\n{=(rlist):{replace({1stentry}~,):{rlist}}}{rlist}\n{=(2ndran):{range:1-9}}{2ndran}\n{=(2ndentry):{rlist({2ndran}):~}}{2ndentry}{require:Admin}",
"embed": "{}",
"last_fetched": "2026-10-20T20:28:38.450Z"
}