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.
The cache of this manager
Readonly
client:Client
The client that instantiated this Manager
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(user):User
Resolves a UserResolvable to a User object.
NameTypeOptionalDescription
userUserResolvableNoThe UserResolvable to identify
resolveId(user):Snowflake
Resolves a UserResolvable to a User id.
NameTypeOptionalDescription
userUserResolvableNoThe UserResolvable to identify
send(user, options):Promise<Message>
Sends a message to a user.
NameTypeOptionalDescription
userUserResolvableNoThe UserResolvable to identify
optionsstring | MessagePayload | MessageCreateOptionsNoThe options to provide
valueOf():Collection<Key, Holds>