UserManager class

A manager for Users.

Inheritance

Constructors

UserManager(CacheConfig<User> config, NyxxRest client)
Create a new UserManager.

Properties

cache Cache<User>
The cache for this manager.
finalinherited
client NyxxRest
The client this manager belongs to.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createDm(Snowflake recipientId) Future<DmChannel>
Create a DM channel with another user.
createGroupDm(List<String> tokens, Map<Snowflake, String> nicks) Future<GroupDmChannel>
Create a DM channel with multiple other users.
fetch(Snowflake id) Future<User>
Fetch the item with the given id from the API.
override
fetchCurrentOAuth2Information() Future<OAuth2Information>
fetchCurrentUser() Future<User>
Fetch the current user from the API.
fetchCurrentUserApplicationRoleConnection(Snowflake applicationId) Future<ApplicationRoleConnection>
Fetch the current user's application role connection for an application.
fetchCurrentUserConnections() Future<List<Connection>>
Fetch the current user's connections.
fetchCurrentUserMember(Snowflake guildId) Future<Member>
Fetch the current user's member for a guild.
get(Snowflake id) Future<User>
Get an item by its id from the cache if it exists, else fetch it from the API.
inherited
leaveGuild(Snowflake guildId) Future<void>
Leave a guild.
listCurrentUserGuilds({Snowflake? after, Snowflake? before, int? limit, bool? withCounts}) Future<List<UserGuild>>
List the guilds the current user is a member of.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(Map<String, Object?> raw) User
Parse the raw data received from the API into an instance of the type of this manager.
override
parseApplicationRoleConnection(Map<String, Object?> raw) ApplicationRoleConnection
Parse a ApplicationRoleConnection from raw.
parseConnection(Map<String, Object?> raw) Connection
Parse a Connection from raw.
toString() String
A string representation of this object.
inherited
updateCurrentUser(UserUpdateBuilder builder) Future<User>
Update the current user.
updateCurrentUserApplicationRoleConnection(Snowflake applicationId, ApplicationRoleConnectionUpdateBuilder builder) Future<ApplicationRoleConnection>
Update the current user's application role connection for an application.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](Snowflake id) PartialUser
Return a partial instance of the entity with ID id containing no data.
override