Package net.dv8tion.jda.client
Interface JDAClient
-
public interface JDAClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ApplicationAction
createApplication(java.lang.String name)
Creates a newApplication
for this user account with the given name.RestAction<Application>
getApplicationById(java.lang.String id)
Retrieves a specificApplication
owned by this user account.RestAction<java.util.List<Application>>
getApplications()
Retrieves allApplications
owned by this user account.RestAction<AuthorizedApplication>
getAuthorizedApplicationById(java.lang.String id)
Retrieves a specificAuthorizedApplication
authorized by this user account.RestAction<java.util.List<AuthorizedApplication>>
getAuthorizedApplications()
Retrieves allAuthorizedApplications
authorized by this user account.Friend
getFriend(Member member)
Friend
getFriend(User user)
Friend
getFriendById(long id)
Friend
getFriendById(java.lang.String id)
java.util.List<Friend>
getFriends()
java.util.List<Friend>
getFriendsByName(java.lang.String name, boolean ignoreCase)
default Group
getGroupById(long id)
default Group
getGroupById(java.lang.String id)
SnowflakeCacheView<Group>
getGroupCache()
default java.util.List<Group>
getGroups()
default java.util.List<Group>
getGroupsByName(java.lang.String name, boolean ignoreCase)
JDA
getJDA()
MentionPaginationAction
getRecentMentions()
Retrieves the recent mentions for the currently logged in client account.MentionPaginationAction
getRecentMentions(Guild guild)
Retrieves the recent mentions for the currently logged in client account.Relationship
getRelationship(Member member)
Relationship
getRelationship(User user)
Relationship
getRelationshipById(long id)
Relationship
getRelationshipById(long id, RelationshipType type)
Relationship
getRelationshipById(java.lang.String id)
Relationship
getRelationshipById(java.lang.String id, RelationshipType type)
java.util.List<Relationship>
getRelationships()
java.util.List<Relationship>
getRelationships(RelationshipType type)
java.util.List<Relationship>
getRelationships(RelationshipType type, java.lang.String name, boolean ignoreCase)
java.util.List<Relationship>
getRelationshipsByName(java.lang.String name, boolean ignoreCase)
UserSettings
getSettings()
-
-
-
Method Detail
-
getJDA
JDA getJDA()
-
getGroupCache
SnowflakeCacheView<Group> getGroupCache()
-
getGroups
default java.util.List<Group> getGroups()
-
getGroupsByName
default java.util.List<Group> getGroupsByName(java.lang.String name, boolean ignoreCase)
-
getGroupById
default Group getGroupById(java.lang.String id)
-
getGroupById
default Group getGroupById(long id)
-
getRelationships
java.util.List<Relationship> getRelationships()
-
getRelationships
java.util.List<Relationship> getRelationships(RelationshipType type)
-
getRelationships
java.util.List<Relationship> getRelationships(RelationshipType type, java.lang.String name, boolean ignoreCase)
-
getRelationshipsByName
java.util.List<Relationship> getRelationshipsByName(java.lang.String name, boolean ignoreCase)
-
getRelationship
Relationship getRelationship(User user)
-
getRelationship
Relationship getRelationship(Member member)
-
getRelationshipById
Relationship getRelationshipById(java.lang.String id)
-
getRelationshipById
Relationship getRelationshipById(long id)
-
getRelationshipById
Relationship getRelationshipById(java.lang.String id, RelationshipType type)
-
getRelationshipById
Relationship getRelationshipById(long id, RelationshipType type)
-
getFriends
java.util.List<Friend> getFriends()
-
getFriendsByName
java.util.List<Friend> getFriendsByName(java.lang.String name, boolean ignoreCase)
-
getFriendById
Friend getFriendById(java.lang.String id)
-
getFriendById
Friend getFriendById(long id)
-
getRecentMentions
@CheckReturnValue MentionPaginationAction getRecentMentions()
Retrieves the recent mentions for the currently logged in client account.The returned
MentionPaginationAction
allows to filter by whether the messages mention everyone or a role.- Returns:
MentionPaginationAction
-
getRecentMentions
@CheckReturnValue MentionPaginationAction getRecentMentions(Guild guild)
Retrieves the recent mentions for the currently logged in client account.The returned
MentionPaginationAction
allows to filter by whether the messages mention everyone or a role.To target recent mentions from all over Discord use
getRecentMentions()
instead!- Parameters:
guild
- TheGuild
to narrow recent mentions to- Returns:
MentionPaginationAction
- Throws:
java.lang.IllegalArgumentException
- If the specified Guild isnull
-
getSettings
UserSettings getSettings()
-
createApplication
@CheckReturnValue ApplicationAction createApplication(java.lang.String name)
Creates a newApplication
for this user account with the given name.A name must not be
null
nor less than 2 characters or more than 32 characters long!Possible
ErrorResponses
caused by the returnedRestAction
include the following:MAX_OAUTH_APPS
OAuth2 application limit reached
- Parameters:
name
- The name for newApplication
- Returns:
- A specific
ApplicationAction
This action allows to set fields for the new application before creating it - Throws:
java.lang.IllegalArgumentException
- If the provided name isnull
, less than 2 or more than 32 characters long
-
getApplications
@CheckReturnValue RestAction<java.util.List<Application>> getApplications()
Retrieves allApplications
owned by this user account.- Returns:
RestAction
- Type:List
<Application
>
A list of all Applications owned by this user account.
-
getApplicationById
@CheckReturnValue RestAction<Application> getApplicationById(java.lang.String id)
Retrieves a specificApplication
owned by this user account.Possible
ErrorResponses
:UNKNOWN_APPLICATION
The Application did not exist (possibly deleted).
- Parameters:
id
- The id for theApplication
- Returns:
RestAction
- Type:Application
The Application behind the provided id.- Throws:
java.lang.IllegalArgumentException
- If the provided id isnull
or empty
-
getAuthorizedApplications
@CheckReturnValue RestAction<java.util.List<AuthorizedApplication>> getAuthorizedApplications()
Retrieves allAuthorizedApplications
authorized by this user account.- Returns:
RestAction
- Type: List<AuthorizedApplication
>
A list of all AuthorizedApplications authorized by this user account.
-
getAuthorizedApplicationById
@CheckReturnValue RestAction<AuthorizedApplication> getAuthorizedApplicationById(java.lang.String id)
Retrieves a specificAuthorizedApplication
authorized by this user account.Possible
ErrorResponses
:UNKNOWN_TOKEN
The Application either doesn't exist or isn't authorized by this user account.
- Parameters:
id
- The id of theAuthorizedApplication
- Returns:
RestAction
- Type:AuthorizedApplication
The Application behind the provided id.- Throws:
java.lang.IllegalArgumentException
- If the provided id isnull
or empty
-
-