List Take
Runs on: Shared (backend or chatbox overlay).
Keeps the first or last Count items of a list. The original list is not modified. Asking for more items than the list holds returns the whole list.
Inputs
| Name | Type | Description |
|---|---|---|
list | list | The list to trim. |
count | number | How many items to keep. Defaults to 5. |
Outputs
| Name | Type | Description |
|---|---|---|
result | list | The trimmed list, with the same item type as the input. |
Configuration
- Keep:
FirstorLast. The end to keep items from.
Example
Chain List Sort (by score, High → Low) into List Take with Keep First and Count 5 for a !top command. Use Keep Last on an unsorted list of recent joiners for the last 5 to join.