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
userUserResolvableNoThe UserResolvable to identify
optionsBaseFetchOptionsYesAdditional 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
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
resolve(user):User | null
Resolves a UserResolvable to a object.
NameTypeOptionalDescription
userUserResolvableNoThe UserResolvable to identify
resolveId(user):Snowflake | null
Resolves a UserResolvable to a 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>