ISnowflake
public static class WidgetUtil.Widget extends java.lang.Object implements ISnowflake
Modifier and Type | Class | Description |
---|---|---|
static class |
WidgetUtil.Widget.Member |
|
static class |
WidgetUtil.Widget.VoiceChannel |
|
static class |
WidgetUtil.Widget.VoiceState |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object obj) |
|
long |
getIdLong() |
The Snowflake id of this entity.
|
java.lang.String |
getInviteCode() |
Gets an invite code for the guild, or null if no invite channel is
enabled in the widget
|
WidgetUtil.Widget.Member |
getMemberById(long id) |
Gets a member with the given ID, or
null if the member is not found |
WidgetUtil.Widget.Member |
getMemberById(java.lang.String id) |
Gets a member with the given ID, or null if the member is not found
|
java.util.List<WidgetUtil.Widget.Member> |
getMembers() |
Gets a list of online members in the guild
|
java.lang.String |
getName() |
Gets the name of the guild
|
WidgetUtil.Widget.VoiceChannel |
getVoiceChannelById(long id) |
Gets a voice channel with the given ID, or
null if the voice channel is not found |
WidgetUtil.Widget.VoiceChannel |
getVoiceChannelById(java.lang.String id) |
Gets a voice channel with the given ID, or null if the voice channel is not found
|
java.util.List<WidgetUtil.Widget.VoiceChannel> |
getVoiceChannels() |
Gets the list of voice channels in the guild
|
int |
hashCode() |
|
boolean |
isAvailable() |
Shows whether or not the widget for a guild is available.
|
java.lang.String |
toString() |
getCreationTime, getId
public boolean isAvailable()
public long getIdLong()
ISnowflake
getIdLong
in interface ISnowflake
public java.lang.String getName()
java.lang.IllegalStateException
- If the widget is not available
public java.lang.String getInviteCode()
java.lang.IllegalStateException
- If the widget is not available
public java.util.List<WidgetUtil.Widget.VoiceChannel> getVoiceChannels()
java.lang.IllegalStateException
- If the widget is not available
public WidgetUtil.Widget.VoiceChannel getVoiceChannelById(java.lang.String id)
id
- the ID of the voice channeljava.lang.IllegalStateException
- If the widget is not available
java.lang.NumberFormatException
- If the provided id
cannot be parsed by Long.parseLong(String)
public WidgetUtil.Widget.VoiceChannel getVoiceChannelById(long id)
null
if the voice channel is not foundid
- the ID of the voice channeljava.lang.IllegalStateException
- If the widget is not available
public java.util.List<WidgetUtil.Widget.Member> getMembers()
java.lang.IllegalStateException
- If the widget is not available
public WidgetUtil.Widget.Member getMemberById(java.lang.String id)
id
- the ID of the memberjava.lang.NumberFormatException
- If the provided id
cannot be parsed by Long.parseLong(String)
java.lang.IllegalStateException
- If the widget is not available
public WidgetUtil.Widget.Member getMemberById(long id)
null
if the member is not foundid
- the ID of the memberjava.lang.IllegalStateException
- If the widget is not available
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object