import { Collection } from "https://deno.land/x/revoltio@v1.0.0/deps.ts";
Searches for a single item where the given function returns a truthy value. This behaves like
Array.find().
All collections used in Discord.js are mapped using their id
property, and if you want to find by id you
should use the get
method. See
MDN for details.
Examples
collection.find(user => user.username === 'Bob');
collection.find(user => user.username === 'Bob');
Parameters
fn: () => value is V2
value: V,
key: K,
collection: this,
The function to test with (should return boolean)