Package org.javacord.api.entity.channel
Interface ThreadMember
-
- All Superinterfaces:
DiscordEntity
public interface ThreadMember extends DiscordEntity
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DiscordApigetApi()Gets the discord api instance.default java.util.Optional<User>getCachedUser()Gets the user from the cache.intgetFlags()Any user-thread settings, currently only used for notifications.java.time.InstantgetJoinTimestamp()The time the current user last joined the thread.ServergetServer()Gets the server related to this thread member.longgetUserId()The id of the user.default java.util.concurrent.CompletableFuture<User>requestUser()Requests a user from Discord with the given id.-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getCreationTimestamp, getId, getIdAsString
-
-
-
-
Method Detail
-
getApi
DiscordApi getApi()
Gets the discord api instance.- Specified by:
getApiin interfaceDiscordEntity- Returns:
- The discord api instance.
-
getServer
Server getServer()
Gets the server related to this thread member.- Returns:
- The server of this thread member.
-
getUserId
long getUserId()
The id of the user.- Returns:
- The id of the user.
-
getCachedUser
default java.util.Optional<User> getCachedUser()
Gets the user from the cache.- Returns:
- The user if it is in the cache.
-
requestUser
default java.util.concurrent.CompletableFuture<User> requestUser()
Requests a user from Discord with the given id.If the user is in the cache, the user is served from the cache.
- Returns:
- The user.
-
getJoinTimestamp
java.time.Instant getJoinTimestamp()
The time the current user last joined the thread.- Returns:
- The timestamp of the last time the current user joined the thread.
-
getFlags
int getFlags()
Any user-thread settings, currently only used for notifications.- Returns:
- Any user-thread settings.
-
-