Skip to main content

List Random Item

Runs on: Shared — pure logic, runs on the Community backend or inside a chatbox overlay.

The List Random Item node picks one random item from a list. It makes exactly one pick per execution, and its Item, Index, and Rest outputs all agree on that same pick.

For lists of custom or built-in objects, an optional Weight field turns the pick into a raffle: a higher weight is more likely to be picked, and an item with a weight of 0 or below is never picked. Leave Weight unset (or pick a primitive list) for a plain uniform pick.

If the list is empty, or every item's weight is 0 or below, the node fires Empty instead of Item/Index/Rest.

Inputs​

NameTypeDescription
listlistThe list to pick from.

Outputs​

NameTypeDescription
item(list's item type)The picked item.
indexnumberThe picked item's index in the original list.
restlistThe list with the picked item removed — wire this back into another List Random Item to draw again without repeats.
emptylistFires instead of the above when the list is empty or nothing has a positive weight. Carries the original (empty, or all-zero-weight) list.

Configuration​

  • Weight: optional, object lists only, number fields only. Leave as None for a uniform pick.

Example​

For a !raffle command with entries shaped { username, tickets }, set Weight to tickets — chatters with more tickets are more likely to win. Send item.username to chat.

For "pick 3 distinct winners", wire rest back into a second List Random Item, and that one's rest into a third — each pick excludes the ones before it. Chaining List Shuffle into List Take is simpler when you want N picks and don't need weighting.