UserManager

export class UserManager extends CachedManager<Snowflake, User, UserResolvable>
export class UserManager extends CachedManager<Snowflake, User, UserResolvable>
Manages API methods for users and stores their cache.
Readonly
cache:Collection<K, Holds>
The cache of items for this manager.
Inherited from DataManager
Readonly
client:Client
The client that instantiated this Manager
Inherited from BaseManager
Readonly
holds:Constructable<Holds>
The data structure belonging to this manager.
Inherited from DataManager
createDM(user, options?):Promise<DMChannel>
Creates a DMChannel between the client and a user.
NameTypeOptionalDescription
userUserResolvableNoThe UserResolvable to identify
optionsBaseFetchOptionsYesAdditional options for this fetch
deleteDM(user):Promise<DMChannel>
Deletes a DMChannel (if one exists) between the client and a user. Resolves with the channel if successful.
NameTypeOptionalDescription
userUserResolvableNoThe UserResolvable to identify
fetch(user, options?):Promise<User>
Obtains a user from Discord, or the user cache if it's already available.
NameTypeOptionalDescription
userUserResolvableNoThe user to fetch
optionsBaseFetchOptionsYesAdditional options for this fetch
fetchFlags(user, options?):Promise<UserFlagsBitField>
Fetches a user's flags.
NameTypeOptionalDescription
userUserResolvableNoThe UserResolvable to identify
optionsBaseFetchOptionsYesAdditional options for this fetch
resolve(idOrInstance):Holds
Resolves a data entry to a data Object.
Returns
An instance from this Manager
NameTypeOptionalDescription
idOrInstanceHoldsNoThe id or instance of something in this Manager
resolveId(idOrInstance):K
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceK | HoldsNoThe id or instance of something in this Manager
send(user, options):Promise<Message>
Sends a message to a user.
NameTypeOptionalDescription
userUserResolvableNoThe UserResolvable to identify
optionsstring | MessagePayload | MessageCreateOptionsNoThe options to provide
valueOf():Collection<K, Holds>