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<Key, 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 between the client and a user.
NameTypeOptionalDescription
userUserResolvableNo
The UserResolvable to identify
optionsBaseFetchOptionsYes
Additional options for this fetch
deleteDM(user):Promise<DMChannel>
Deletes a (if one exists) between the client and a user. Resolves with the channel if successful.
NameTypeOptionalDescription
userUserResolvableNo
The UserResolvable to identify
fetch(user, options?):Promise<User>
Obtains a user from Discord, or the user cache if it's already available.
NameTypeOptionalDescription
userUserResolvableNo
The user to fetch
optionsBaseFetchOptionsYes
Additional options for this fetch
fetchFlags(user, options?):Promise<UserFlagsBitField>
Fetches a user's flags.
NameTypeOptionalDescription
userUserResolvableNo
The UserResolvable to identify
optionsBaseFetchOptionsYes
Additional options for this fetch
resolve(user):User
Resolves a UserResolvable to a object.
NameTypeOptionalDescription
userUserResolvableNo
The UserResolvable to identify
resolveId(user):Snowflake
Resolves a UserResolvable to a id.
NameTypeOptionalDescription
userUserResolvableNo
The UserResolvable to identify
send(user, options):Promise<Message>
Sends a message to a user.
NameTypeOptionalDescription
userUserResolvableNo
The UserResolvable to identify
optionsstring | MessagePayload | MessageCreateOptionsNo
The options to provide
valueOf():Collection<Key, Holds>