Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/collection/src/Collection.ts>Collection#random

Utility data structure for Deno (Discord.js Collection).
Latest
method Collection.prototype.random
import { Collection } from "https://deno.land/x/collection@v1.0.1/src/Collection.ts";

Obtains unique random value(s) from this collection. This relies on Collection#array, and thus the caching mechanism applies here as well.

Returns

V

A single value if no amount is provided or an array of values

Parameters

amount: number