-
-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added more info for invites, no exceptions yet
- Loading branch information
Showing
3 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
|
||
import javax.annotation.CheckReturnValue; | ||
import java.time.OffsetDateTime; | ||
import net.dv8tion.jda.core.entities.Guild.VerificationLevel; | ||
|
||
/** | ||
* Representation of a Discord Invite. | ||
|
@@ -53,7 +54,32 @@ public interface Invite | |
*/ | ||
static RestAction<Invite> resolve(final JDA api, final String code) | ||
{ | ||
return InviteImpl.resolve(api, code); | ||
return resolve(api, code, false); | ||
} | ||
|
||
/** | ||
* Retrieves a new {@link net.dv8tion.jda.core.entities.Invite Invite} instance for the given invite code. | ||
* <br><b>You cannot resolve invites if you were banned from the origin Guild!</b> | ||
* | ||
* <p>Possible {@link net.dv8tion.jda.core.requests.ErrorResponse ErrorResponses} include: | ||
* <ul> | ||
* <li>{@link net.dv8tion.jda.core.requests.ErrorResponse#UNKNOWN_INVITE Unknown Invite} | ||
* <br>The Invite did not exist (possibly deleted) or the account is banned in the guild.</li> | ||
* </ul> | ||
* | ||
* @param api | ||
* The JDA instance | ||
* @param code | ||
* A valid invite code | ||
* @param withCounts | ||
* Whether or not to include online and member counts | ||
* | ||
* @return {@link net.dv8tion.jda.core.requests.RestAction RestAction} - Type: {@link net.dv8tion.jda.core.entities.Invite Invite} | ||
* <br>The Invite object | ||
*/ | ||
static RestAction<Invite> resolve(final JDA api, final String code, final boolean withCounts) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
MinnDevelopment
Member
|
||
{ | ||
return InviteImpl.resolve(api, code, withCounts); | ||
} | ||
|
||
/** | ||
|
@@ -296,5 +322,26 @@ interface Guild extends ISnowflake | |
* @see #getSplashId() | ||
*/ | ||
String getSplashUrl(); | ||
|
||
/** | ||
* Returns the {@link net.dv8tion.jda.core.entities.Guild.VerificationLevel VerificationLevel} of this guild. | ||
* | ||
* @return the verification level of the guild | ||
*/ | ||
VerificationLevel getVerificationLevel(); | ||
|
||
/** | ||
* Returns the approximate count of online members in the guild. | ||
* | ||
* @return TODO | ||
*/ | ||
int getOnlineCount(); | ||
|
||
/** | ||
* Returns the approximate count of total members in the guild. | ||
* | ||
* @return TODO | ||
*/ | ||
int getMemberCount(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is there any reason you'd ever want to disable presence and member counts?