Constructor and Description |
---|
GuildImpl(JDAImpl api,
java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
RoleManager |
createRole()
Creates a new
Role in this Guild. |
ChannelManager |
createTextChannel(java.lang.String name)
Creates a new
TextChannel in this Guild. |
ChannelManager |
createVoiceChannel(java.lang.String name)
Creates a new
VoiceChannel in this Guild. |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAfkChannelId()
The Id of the AFK Voice Channel.
|
int |
getAfkTimeout()
The amount of time (in seconds) that must pass with no activity to be considered AFK by this
Guild . |
java.lang.String |
getIconId()
The Discord Id of the
Guild icon image. |
java.lang.String |
getIconUrl()
The URL of the
Guild icon image. |
java.lang.String |
getId()
The Id of the
Guild . |
JDA |
getJDA()
Returns the
JDA instance of this Guild |
java.time.OffsetDateTime |
getJoinDateForUser(User user)
Provides the join-date for a given
User . |
java.util.Map<User,java.time.OffsetDateTime> |
getJoinedAtMap() |
GuildManager |
getManager()
Returns the
GuildManager for this Guild. |
java.lang.String |
getName()
The human readable name of the
Guild . |
java.lang.String |
getOwnerId()
|
Role |
getPublicRole()
|
Region |
getRegion()
|
java.util.List<Role> |
getRoles()
|
java.util.List<Role> |
getRolesForUser(User user)
|
java.util.Map<java.lang.String,Role> |
getRolesMap() |
java.util.List<TextChannel> |
getTextChannels()
The
TextChannels available on the Guild . |
java.util.Map<java.lang.String,TextChannel> |
getTextChannelsMap() |
java.util.Map<User,java.util.List<Role>> |
getUserRoles() |
java.util.List<User> |
getUsers()
|
java.util.List<VoiceChannel> |
getVoiceChannels()
The
VoiceChannels available on the Guild . |
java.util.Map<java.lang.String,VoiceChannel> |
getVoiceChannelsMap() |
java.util.List<VoiceStatus> |
getVoiceStatuses()
A list containing the
VoiceStatus of every User
in this Guild .This will never return an empty list because if it were empty, that would imply that there are no Users in this Guild , which is
impossible. |
java.util.Map<User,VoiceStatus> |
getVoiceStatusMap() |
VoiceStatus |
getVoiceStatusOfUser(User user)
|
int |
hashCode() |
boolean |
isAvailable()
Returns whether or not this Guild is available.
|
GuildImpl |
setAfkChannelId(java.lang.String channelId) |
GuildImpl |
setAfkTimeout(int afkTimeout) |
GuildImpl |
setAvailable(boolean available) |
GuildImpl |
setIconId(java.lang.String iconId) |
GuildImpl |
setName(java.lang.String name) |
GuildImpl |
setOwnerId(java.lang.String ownerId) |
GuildImpl |
setPublicRole(Role role) |
GuildImpl |
setRegion(Region region) |
java.lang.String |
toString() |
public GuildImpl(JDAImpl api, java.lang.String id)
public JDA getJDA()
Guild
JDA
instance of this Guildpublic java.lang.String getId()
Guild
Guild
. This is typically 18 characters long.public java.lang.String getName()
Guild
Guild
. If no name has been set, this returns null.public java.lang.String getIconId()
Guild
Guild
icon image. If no icon has been set, this returns null.public java.lang.String getIconUrl()
Guild
Guild
icon image. If no icon has been set, this returns null.getIconUrl
in interface Guild
public java.lang.String getAfkChannelId()
Guild
getAfkChannelId
in interface Guild
public java.lang.String getOwnerId()
Guild
User
Id of the owner of this Guild
.Guild
,
and a such this User
is also the original creator.getOwnerId
in interface Guild
public int getAfkTimeout()
Guild
Guild
.
Default is 300 seconds (5 minutes)getAfkTimeout
in interface Guild
public java.util.List<TextChannel> getTextChannels()
Guild
TextChannels
available on the Guild
.getTextChannels
in interface Guild
TextChannels
.public ChannelManager createTextChannel(java.lang.String name)
Guild
TextChannel
in this Guild.
For this to be successful, the logged in account has to have the MANAGE_CHANNEL Permission
createTextChannel
in interface Guild
name
- the name of the TextChannel to createpublic java.util.List<VoiceChannel> getVoiceChannels()
Guild
VoiceChannels
available on the Guild
.getVoiceChannels
in interface Guild
VoiceChannels
.public ChannelManager createVoiceChannel(java.lang.String name)
Guild
VoiceChannel
in this Guild.
For this to be successful, the logged in account has to have the MANAGE_CHANNEL Permission
createVoiceChannel
in interface Guild
name
- the name of the VoiceChannel to createpublic RoleManager createRole()
Guild
Role
in this Guild.
For this to be successful, the logged in account has to have the MANAGE_ROLES Permission
createRole
in interface Guild
public java.util.List<Role> getRolesForUser(User user)
Guild
getRolesForUser
in interface Guild
user
- The User
that we wish to get the Roles
related to.Roles
.public Role getPublicRole()
Guild
getPublicRole
in interface Guild
Role
public java.time.OffsetDateTime getJoinDateForUser(User user)
Guild
User
.getJoinDateForUser
in interface Guild
user
- The User
that we wish to get the join-date for.public GuildManager getManager()
Guild
GuildManager
for this Guild.
In the GuildManager, you can modify most of its properties, and leave or delete it.getManager
in interface Guild
public VoiceStatus getVoiceStatusOfUser(User user)
Guild
VoiceStatus
of the provide User
on this Guild
. Every User
in this guild
will have a matching VoiceStatus
.User
that is not in this Guild
is provided, this will return null
.getVoiceStatusOfUser
in interface Guild
user
- The User
whose VoiceStatus
is requested.VoiceStatus
.public java.util.List<VoiceStatus> getVoiceStatuses()
Guild
VoiceStatus
of every User
in this Guild
.Users
in this Guild
, which is
impossible.getVoiceStatuses
in interface Guild
VoiceStatuses
on this Guild
.public boolean isAvailable()
Guild
isAvailable
in interface Guild
public java.util.Map<java.lang.String,Role> getRolesMap()
public GuildImpl setName(java.lang.String name)
public GuildImpl setIconId(java.lang.String iconId)
public GuildImpl setOwnerId(java.lang.String ownerId)
public GuildImpl setAfkTimeout(int afkTimeout)
public GuildImpl setAfkChannelId(java.lang.String channelId)
public java.util.Map<java.lang.String,TextChannel> getTextChannelsMap()
public java.util.Map<java.lang.String,VoiceChannel> getVoiceChannelsMap()
public java.util.Map<User,VoiceStatus> getVoiceStatusMap()
public java.util.Map<User,java.time.OffsetDateTime> getJoinedAtMap()
public GuildImpl setAvailable(boolean available)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object