Skip to main content

List Take

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

The List Take node keeps the first or last Count items of a list and outputs the trimmed copy. The original list passed in is never modified.

Asking for more items than the list holds returns the whole list — it never errors on a short list.

Inputs​

NameTypeDescription
listlistThe list to trim.
countnumberHow many items to keep. Defaults to 5.

Outputs​

NameTypeDescription
resultlistThe trimmed copy of the list, same item type as the input.

Configuration​

  • Keep: First or Last — which end of the list to keep items from.

Example​

Chain List Sort (by score, High → Low) into List Take with Keep set to First and Count set to 5 to build a top-5 leaderboard for a !top chat command. Set Keep to Last on an unsorted list of recent joiners to get "the last 5 people to join."