public interface Guild extends ISnowflake
Guild
. This should contain all information provided from Discord about a Guild.Modifier and Type | Interface and Description |
---|---|
static class |
Guild.MFALevel
Represents the Multifactor Authentication level required by the Guild.
|
static class |
Guild.NotificationLevel
Represents the Notification-level of the Guild.
|
static class |
Guild.Timeout
Represents the idle time allowed until a user is moved to the
AFK
VoiceChannel if one is set. |
static class |
Guild.VerificationLevel
Represents the Verification-Level of the Guild.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkVerification()
Checks if the current Verification-level of this guild allows JDA to send messages to it.
|
RestAction<java.lang.Void> |
delete() |
VoiceChannel |
getAfkChannel() |
Guild.Timeout |
getAfkTimeout()
The amount of time (in seconds) that must pass with no activity to be considered AFK by this
Guild . |
GuildController |
getController() |
Guild.NotificationLevel |
getDefaultNotificationLevel()
Returns the default message Notification-Level of this Guild.
|
Emote |
getEmoteById(java.lang.String id)
An
Emote matching the specified ID. |
java.util.List<Emote> |
getEmotes()
An immutable linked list of the emotes contained in this Guild.
|
java.util.List<Emote> |
getEmotesByName(java.lang.String name,
boolean ignoreCase)
|
java.lang.String |
getIconId()
The Discord Id of the
Guild icon image. |
java.lang.String |
getIconUrl()
The URL of the
Guild icon image. |
JDA |
getJDA()
Returns the
JDA instance of this Guild |
GuildManager |
getManager()
Returns the
GuildManager for this Guild. |
GuildManagerUpdatable |
getManagerUpdatable() |
Member |
getMember(User user) |
Member |
getMemberById(java.lang.String userId) |
java.util.List<Member> |
getMembers() |
java.util.List<Member> |
getMembersByEffectiveName(java.lang.String name,
boolean ignoreCase) |
java.util.List<Member> |
getMembersByName(java.lang.String name,
boolean ignoreCase) |
java.util.List<Member> |
getMembersByNickname(java.lang.String nickname,
boolean ignoreCase) |
java.util.List<Member> |
getMembersWithRoles(java.util.Collection<Role> roles) |
java.util.List<Member> |
getMembersWithRoles(Role... roles) |
java.lang.String |
getName()
The human readable name of the
Guild . |
Member |
getOwner()
|
TextChannel |
getPublicChannel()
The default
TextChannel for a Guild . |
Role |
getPublicRole()
|
Region |
getRegion()
|
Guild.MFALevel |
getRequiredMFALevel()
Returns the level of multifactor authentication required to execute administrator restricted functions in this guild.
|
Role |
getRoleById(java.lang.String id)
|
java.util.List<Role> |
getRoles()
|
java.util.List<Role> |
getRolesByName(java.lang.String name,
boolean ignoreCase) |
Member |
getSelfMember() |
java.lang.String |
getSplashId() |
java.lang.String |
getSplashUrl() |
TextChannel |
getTextChannelById(java.lang.String id) |
java.util.List<TextChannel> |
getTextChannels()
The
TextChannels available on the Guild . |
java.util.List<TextChannel> |
getTextChannelsByName(java.lang.String name,
boolean ignoreCase) |
Guild.VerificationLevel |
getVerificationLevel()
Returns the verification-Level of this Guild.
|
VoiceChannel |
getVoiceChannelById(java.lang.String id) |
java.util.List<VoiceChannel> |
getVoiceChannels()
The
VoiceChannels available on the Guild . |
java.util.List<VoiceChannel> |
getVoiceChannelsByName(java.lang.String name,
boolean ignoreCase) |
java.util.List<VoiceState> |
getVoiceStates()
A list containing the
VoiceState of every Member
in this Guild .This will never return an empty list because if it were empty, that would imply that there are no Members in this Guild , which is
impossible. |
boolean |
isAvailable()
Returns whether or not this Guild is available.
|
boolean |
isMember(User user)
Used to determine the provided
User is a member of this Guild. |
RestAction<java.lang.Void> |
leave() |
getCreationTime, getId
java.lang.String getName()
Guild
. If no name has been set, this returns null.java.lang.String getIconId()
Guild
icon image. If no icon has been set, this returns null.java.lang.String getIconUrl()
Guild
icon image. If no icon has been set, this returns null.java.lang.String getSplashId()
java.lang.String getSplashUrl()
VoiceChannel getAfkChannel()
Member getOwner()
Guild.Timeout getAfkTimeout()
Guild
.
Default is 300 seconds (5 minutes)Region getRegion()
boolean isMember(User user)
User
is a member of this Guild.user
- The user to determine whether or not they are a member of this guild.Member getSelfMember()
Member getMemberById(java.lang.String userId)
java.util.List<Member> getMembers()
java.util.List<Member> getMembersByName(java.lang.String name, boolean ignoreCase)
java.util.List<Member> getMembersByNickname(java.lang.String nickname, boolean ignoreCase)
java.util.List<Member> getMembersByEffectiveName(java.lang.String name, boolean ignoreCase)
TextChannel getTextChannelById(java.lang.String id)
java.util.List<TextChannel> getTextChannels()
TextChannels
available on the Guild
.
The channels returned will be sorted according to their position.TextChannels
.java.util.List<TextChannel> getTextChannelsByName(java.lang.String name, boolean ignoreCase)
VoiceChannel getVoiceChannelById(java.lang.String id)
java.util.List<VoiceChannel> getVoiceChannels()
VoiceChannels
available on the Guild
.
The channels returned will be sorted according to their position.VoiceChannels
.java.util.List<VoiceChannel> getVoiceChannelsByName(java.lang.String name, boolean ignoreCase)
Role getRoleById(java.lang.String id)
Role
which has the same id as the one provided.Role
that matches the requested id, null
is returned.id
- The id of the Role
.java.util.List<Role> getRolesByName(java.lang.String name, boolean ignoreCase)
Emote getEmoteById(java.lang.String id)
Emote
matching the specified ID.id
- the emote idjava.util.List<Emote> getEmotes()
java.util.List<Emote> getEmotesByName(java.lang.String name, boolean ignoreCase)
TextChannel getPublicChannel()
TextChannel
for a Guild
.
This channel cannot be deleted and the Public Role
always has the ability to
Permission.MESSAGE_READ
this channel.TextChannel
representing the public channel for this guild.GuildManager getManager()
GuildManager
for this Guild.
In the GuildManager, you can modify most of its properties, and leave or delete it.GuildUnavailableException
- if the guild is temporarily unavailableGuildManagerUpdatable getManagerUpdatable()
GuildController getController()
RestAction<java.lang.Void> leave()
RestAction<java.lang.Void> delete()
java.util.List<VoiceState> getVoiceStates()
VoiceState
of every Member
in this Guild
.Members
in this Guild
, which is
impossible.VoiceStates
on this Guild
.Guild.VerificationLevel getVerificationLevel()
Guild.VerificationLevel
.Guild.NotificationLevel getDefaultNotificationLevel()
NotificationLevel
.Guild.MFALevel getRequiredMFALevel()
MFALevel
.boolean checkVerification()
VerificationLevel Enum with a list of possible verification-levels and their requirements
boolean isAvailable()