Class WidgetImpl
java.lang.Object
net.dv8tion.jda.internal.entities.WidgetImpl
- All Implemented Interfaces:
ISnowflake
,Widget
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
class
class
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.Widget
Widget.Member, Widget.VoiceChannel, Widget.VoiceState
-
Constructor Summary
ConstructorsConstructorDescriptionWidgetImpl
(long guildId) Constructs an unavailable WidgetWidgetImpl
(DataObject json) Constructs an available Widget -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
The Snowflake id of this entity.Gets an invite code for the guild, or null if no invite channel is enabled in the widgetgetMemberById
(long id) Gets a member with the given ID, ornull
if the member is not foundgetMemberById
(String id) Gets a member with the given ID, or null if the member is not foundGets a list of online members in the guildgetName()
Gets the name of the guildgetVoiceChannelById
(long id) Gets a voice channel with the given ID, ornull
if the voice channel is not foundGets a voice channel with the given ID, or null if the voice channel is not foundGets the list of voice channels in the guildint
hashCode()
boolean
Shows whether or not the widget for a guild is available.toString()
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Constructor Details
-
WidgetImpl
public WidgetImpl(long guildId) Constructs an unavailable Widget -
WidgetImpl
Constructs an available Widget- Parameters:
json
- TheDataObject
to construct the Widget from
-
-
Method Details
-
isAvailable
public boolean isAvailable()Description copied from interface:Widget
Shows whether or not the widget for a guild is available. If this method returns false, all other values will be null- Specified by:
isAvailable
in interfaceWidget
- Returns:
- True, if the widget is available, false otherwise
-
getIdLong
public long getIdLong()Description copied from interface:ISnowflake
The Snowflake id of this entity. This is unique to every entity and will never change.- Specified by:
getIdLong
in interfaceISnowflake
- Returns:
- Long containing the Id.
-
getName
Description copied from interface:Widget
Gets the name of the guild -
getInviteCode
Description copied from interface:Widget
Gets an invite code for the guild, or null if no invite channel is enabled in the widget- Specified by:
getInviteCode
in interfaceWidget
- Returns:
- an invite code for the guild, if widget invites are enabled
-
getVoiceChannels
Description copied from interface:Widget
Gets the list of voice channels in the guild- Specified by:
getVoiceChannels
in interfaceWidget
- Returns:
- the list of voice channels in the guild
-
getVoiceChannelById
Description copied from interface:Widget
Gets a voice channel with the given ID, or null if the voice channel is not found- Specified by:
getVoiceChannelById
in interfaceWidget
- Parameters:
id
- the ID of the voice channel- Returns:
- possibly-null VoiceChannel with the given ID.
-
getVoiceChannelById
Description copied from interface:Widget
Gets a voice channel with the given ID, ornull
if the voice channel is not found- Specified by:
getVoiceChannelById
in interfaceWidget
- Parameters:
id
- the ID of the voice channel- Returns:
- possibly-null VoiceChannel with the given ID.
-
getMembers
Description copied from interface:Widget
Gets a list of online members in the guild- Specified by:
getMembers
in interfaceWidget
- Returns:
- the list of members
-
getMemberById
Description copied from interface:Widget
Gets a member with the given ID, or null if the member is not found- Specified by:
getMemberById
in interfaceWidget
- Parameters:
id
- the ID of the member- Returns:
- possibly-null Member with the given ID.
-
getMemberById
Description copied from interface:Widget
Gets a member with the given ID, ornull
if the member is not found- Specified by:
getMemberById
in interfaceWidget
- Parameters:
id
- the ID of the member- Returns:
- possibly-null Member with the given ID.
-
hashCode
public int hashCode() -
equals
-
toString
-