Skip to main content

Resource managers

Import these classes from talos-fluxer or talos-fluxer/resources. Client and Resources create the usual managers for you. Constructors take a Resources hub; guild-scoped managers also take a guild ID. All fetch() methods request fresh API data. A cache lookup is explicit. Options accept signal, timeoutMs, and reason. See the source and cache usage.

Users

Available as client.users or resources.users. Constructor: new Users(resources, cacheOptions); pass {} for defaults.

Channels

Available as client.channels or resources.channels. Constructor: new Channels(resources, cacheOptions).

Guilds

Available as client.guilds or resources.guilds. Constructor: new Guilds(resources, cacheOptions). wrap() expects the guild response shape, not the larger gateway guild-ready envelope. Resources.apply() handles supported gateway envelopes.

Members

Available as guild.members. Constructor: new Members(resources, guildId). The iterator requests up to 1,000 members per page and stops when you leave the loop. Omitting the total limit walks all available pages. Members share resources.memberCache; this manager does not allocate its own cache.

Roles

Available as guild.roles. Constructor: new Roles(resources, guildId). Returned roles are stored in the hub’s role cache when it is enabled. Role permission fields are decimal strings; use Permissions.toRequest().

Invites

Available as client.invites or resources.invites. Constructor: new Invites(resources). Pass the invite code, not the full URL. These methods return raw API data rather than an invite wrapper class. Create or list channel invites through Channel; list guild invites through Guild.